Why do shocks travel further down the wing as the Mach number increases?

Inspired by this question, why do shocks move further back on a wing as the Mach number increases?

Normal shocks on the surfaces of wings form when the air molecules of the pressure recovery area on the wing don’t have time to react to the incoming air. Not having time to react causes a rapid compression of the air, making a shockwave.

Now if the air on the wing was traveling faster, when it got to the pressure recovery, it would just collapse into a stronger shock but in the same position, right? Why does it not do that and instead move further back in the wing?

Some pictures to see what I’m taking about :

This is when the shock is half down the wing. (Ignore the separation part of the photo)

Then at a higher speed, the shocks for some reason move backwards instead of just staying where they were and getting stronger. Why is that?

• @sophit good point. Separation will still cause drag, but not wave drag in this case. Commented Apr 21 at 20:53
• The boundary layer separation aft of the shock wave does not cause wave drag as suggested in the first picture. Wave drag is an intrinsic drag generated at supersonic speeds and has nothing to do with boundary layer. As already suggested by @RobMcDonald beware of random pictures from the internet. Btw, what's the source of that picture? Commented Apr 21 at 20:53

Why would it stay in the same place? Is there some physical object to keep it there? Something like a ridge or a bump or a throat of a nozzle?

On a smooth surface, the location a shock 'chooses' is determined by a balance of effects. One of those is the upstream Mach number -- as the airfoil goes faster, the supersonic region around the airfoil gets larger and the Mach number in it gets larger. Another is the back pressure.

Without worrying about the details, when we're faced with a balance of factors like this, there is no reason to think they will be the same as you vary the important conditions. In fact, it makes a lot more sense for them to be different.

Edit