What makes longitudinal waves work? I am quite confused by what makes a wavefront that is part of the compression (line A) turn back towards the rarefaction area. Lets say that the sound is propagating left to right in the image:

What force exactly makes A go backwards suddenly? The compression was made by an external force towards the right and the wavefront B is still going in that direction. I have 2 guesses:

*

*The air column above the particle A, due to it's weight and gravity, is squeezing downwards on it causing it to go somewhere and it can't go any other way but left. (going from high towards the low pressure area due to gravity basically). But why doesn't the air above the rarefaction simply fill out the space?

*The molecular bonds of air in the wavefront "B" that were squeezed/compressed are now uncompressing, springing back exerting force on particle A towards the left. (is this what air elasticity" is?)

EDIT: I found this somewhere on the site, it might be related to the answer (or part of the answer at least):

The other weird thing about the animation is that the molecules stop
moving and turn around without colliding with anything! It should be
obvious that in a real gas made of electrically neutral particles,
there is no long-distance force that would cause this to happen, and a
moving particle would not change direction unless it actually collided
with another particle.

Is collision with other particles the reason for particle A in the picture going back towards rarefaction? And the only reason that low pressure area gets filled up is random "trial and error" of particles bouncing off of each other?
 A: Air molecules at standard temperature and pressure have a mean free path between collisions of order $\rm 10^2 \ nm =10^{-7}\ m$.  An “ultrasonic” audio frequency might be about $10^5\rm \,Hz$. (Human hearing disappears for frequencies above about 20 kHz.) But with typical thermal speeds of $10^2\rm\,m/s$, the air molecules are colliding with each other billions of times per second.
The motion of an air molecule during a single rarefaction-to-rarefaction cycle of an ultrasonic sound wave is governed by many thousands of collisions. This is plenty of opportunities for a pressure differential to drive a particular molecule towards the low-pressure part of the sound wave, and plenty enough that the approximation of continuum motion is useful.
A: When we have a sound wave in air, we have a wave movement combined with the normal random movement of the molecules in the air. The random movement results in collision between molecules and between molecules and anything else. The pressure is the average force (per unit area) exerted by the effect of all these collision.
The lines in your diagram do not correspond to actual air molecules. When a line is in its central position it shows that the average position of air molecules in that region is where it normally would be, and when a line is moved to the right it shows that the average position of molecules is moved to the right. Note though that the movement of the line does not show how far the molecules have moved; it is only a representation.
Where the lines are closer together the pressure is higher, so the molecules they represent will undergo more collisions, which will on average push them away from each other, towards places there are fewer collisions (where the lines are further apart). Hence the lines can move backwards even if the next line is moving forwards; this just means that the molecules in that area have a net movement backwards, while the molecules ahead of them have a net movement forward. This will soon bring about a lower pressure in that place, but that won't be seen until a later snapshot.
A: The basic mechanism behind a standard harmonic motion is having some quantity whose second derivative varies as a function of that quantity (in more complicated cases, it's a function of that quantity as well as others). This function is such that the derivative of the quantity is out of phase with the function and second derivative: the quantity will "overshoot" some equilibrium value, and move away from the equilibrium when it's at the equilibrium (i.e. have nonzero derivative when the function is zero). This "overshooting" is core to the wave phenomenon: the quantity will overshoot in one direction, be pulled back, and then come back to the equilibrium point, but now it has a nonzero derivative in the other direction and overshoots, back and forth.
Generally, the quantity is position, and then the second derivative is acceleration, which is proportional to force; that is, force is a function of position. In the case of a longitudinal wave, the quantity is density. Increasing the density increases the pressure, which increases the outward force, which increases the expansion rate, which decreases the density. However, the gas retains the expansion velocity even when it reaches the equilibrium pressure and no longer has an outward force, so it overshoots the equilibrium pressure and becomes rarified (low pressure).
