The answer here explains how jet engines work. During the BOOM phase air expands, however, the expansion would be in both direction, say toward the turbine blades as well as towards the compressor blades. Why is it that the compressor blades are not affected by this, because the blow could actually cause the compressor blades to rotate in the reverse direction?
The shape of combustion chamber does the trick. It's expanding towards the turbine. Pressure is highest when the air leaves the last compressor disk. Fuel is added to keep pressure from dropping. The pressure it's just a bit lower but the amount and temperature of the air is much greater so the air can be used to turn turbine. To increase efficiency pressure drop is kept to minimum. If something wrong happens or throttle is advanced very fast compressor blades can be effected. The surge happens and flow direction reverses. Look at the cutout picture of a real jet engine. It will be obvious. There are very simplified pictures of the jet engine that can make understanding confusing as they can be just wrong.
One way to look at this is that you have a certain geometry (e.g. dia of each section, the blade spacing etc.) and a certain set of boundary conditions (e.g. far away from the system the P & T must return to ambient + continuum changes in P / T / flow etc. + velocity at wall set to zero) and a combustion zone with a specific mass contribution per unit time.
The pressure distribution and local flow profile is what evolves when you solve the governing flow and conservation equations. With the additional constraints offered by gas laws, commpressibility equations, heat transfer equations etc.
Sure, with the right (wrong?) set of parameters you can indeed "expand in both directions".
My point is, perhaps the analogy or the easy to understand qualitative explanation only takes you so far. At some point the flow direction is what evolves from solving a particular geometry with a particular set of boundary conditions.
The next question is, why do the products of the combustion go out through the turbine than back through the compressor? Consider: the compressor and turbine are approximately the same diameter, and turning at the same angular speed, but because the gas has expanded due to the combustion process, there is more volumetric flow through the turbine than through the compressor. Because of this, the blades of the turbine are angled more steeply to be at the same angle of attack to the local flow. This difference in angle acts as a lower "gear ratio." -- for a given lift, the steeply angled blade generates less axial force and more torque. That's why, for a given pressure in the combustion chamber, the turbine generates more torque and controls which way the whole assembly turns.
As I understand it, the air duct is wider in one direction, and/or rotor blades are arranged to offer less resistance to the air exiting in that direction, so most air is exiting in that direction. This applies sufficient torque on the shaft to rotate it and overcome the reverse torque on the other end of the shaft, where the airduct is more narrow and/or the blades are additionally "geared" to different ratio of torque-vs-pressure-drop.
These differences in air duct cross-section and blades angle of attack determine which end of the engine is which.