For one, don't only look at the engine, but at the whole propulsion system. This includes tanks, piping, controls, pumps and the actual engine. Now the rocket looks much less favorable, especially if you size the tanks for equal running times.
The rocket does not need any of the parts which are ahead of the combustion chamber of a jet and also does not need the turbine. Also, being designed for full thrust only, it does not need an adjustable nozzle. Please look below at the engine installation of a typical airliner (I tried but could not find a fitting cross section of a turbojet plus intake):
Jet engine and nacelle cutaway drawing (picture source). As @Talisker correctly observed in the comments, the labels "high speed jet" and "low speed jet" have to be swapped in order to be correct.
Only the part labeled "combustor" and the section aft of the turbine are actually comparable to a rocket engine - all else is needed to condition and compress air or drive the turbo machinery in front. A rocket enjoys the luxury of being fed propellant and oxidizer at just the right ratio, condition and at high pressure, and since the oxidizer is mostly pure liquid oxygen, the turbo pumps for compressing it can be much smaller than the turbo machinery of a jet which works with an 80% nitrogen - 20% oxygen mixture of gasses.