So every (non-technical) explanation of ramjets I've seen talks about how the intake slows and pressurizes the incoming air before combustion but then takes for granted the fact that burning fuel should produce net thrust. Why? Why don't the expanding gases created by combustion (via added gases and heat) create just as large a force in the forward as backward direction?
Image Source: Wikiwand Ramjet
The key to this idea is to achieve forward speed, lots of it, far more than commercial aircraft. Ramjets cannot self launch, but once they are launched, by rockets usually, they begin a cycle of taking air in at the front, and using the forward motion of the vehicle to compress that air, then adding fuel to produce heat and pressure, resulting in a higher exhaust speed than the intake speed.
The nozzle design at the rear of the vehicle helps the airflow through the vehicle move in an efficient manner, much like the exhaust nozzles on rocket engines.
Ramjets work best at a speed regime of around Mach 3 (3,675 km/h). This type of engine can operate up to speeds of Mach 6 (7,350 km/h), beyond that you need a Scramjet design.
To answer your comment, the idea is that once you get up to speed, rather than comparing it to static conditions, the airflow is naturally inclined and encourged both by blockages at the front and nozzle design at the rear, to pass through the vehicle.
Ramjets face the same problem as Concorde did, a ramp or diffuser needs to be used to slow supersonic incoming air to subsonic speeds inside the combustion chamber.
If you look at the diagram above, this device also acts to, at least partially, prevent gases at relatively low pressure from heading back to the intake, where the air speed is much higher. So as you have slowed the gas down inside the combustion chamber, it's much more likely to exit through the nozzle than to move against the supersonic airflow that is at the throat of the intake.
The rear nozzle is designed to improved the efficiency of the exiting gases. For a ramjet operating at a subsubsonic speeds, it's exhaust flow is accelerated through a converging nozzle. For a supersonic flight Mach number, acceleration is aided by a convergent-divergent (De Lavel) nozzle.
Its operation relies on the different properties of gases flowing at subsonic and supersonic speeds. The speed of a subsonic flow of gas will increase if the pipe carrying it narrows because the mass flow rate is constant. In a subsonic flow the gas is compressible, and sound will propagate through it. At the "throat", where the cross-sectional area is at its minimum, the gas velocity locally becomes sonic (Mach number = 1.0), a condition called choked flow. As the nozzle cross-sectional area increases, the gas begins to expand, and the gas flow increases to supersonic velocities, where a sound wave will not [my emphasis] propagate backwards through the gas as viewed in the frame of reference of the nozzle (Mach number > 1.0).
Image Source and above extract from Convergent-Divergent Nozzles:
I am sure you already know this, so apologies for that, but for those that don't, the earliest ramjet like idea was the pulse jet, the V1 missile, which had intake shutters, like valves, that stopped air escaping from the front. Their power systems were designed to operate on an intermittent basis, unlike the continously operating ramjet you are asking about.