Firstly, the centre of pressure is the point where the sum of all the pressures exerted on the wing is averaged. It is the point through which the aerodynamic force acts and moves with angle of attack, generally moving forward with increased angle, yet why as we reach the stall angle does it suddenly move backwards?
As we continue to increase the angle of attack, we approach the stall angle, and so the centre of pressure moves forward, as the width of the ‘column’ of lift acting on the surface is reduced. The air towards the tail end of the wing separates from the wing surface, and no longer generates lift to ‘pull’ it up, and the turbulent air that forms as a result, moves closer and closer to the front part of the wing. Eventually, the angle of attack becomes so steep that we have virtually no more of the lift ‘column’ remaining and the stall occurs. At this point, all the air on the upper surface of the wing has become turbulent (and has no lifting force), and all the remaining forces are coming from the under-side of the wing.
The turbulent air pressure on the upper part of the wing is approximately equal across the entire upper surface of the wing, therefore the average of this pressure (the CP) lies at approximately 50% of the wing chord. We need to remember that forces act on both the upper side and lower side of the wing. In the stall, the lifting force on the upper side is no longer an active participant, but the pressures acting on the under-side have increased (due to the lack of lift on the upper side), and are also approximately equal, therefore the average of the pressures here also lies at around the half-way mark.
As the average of pressures (CP) is now at the 50% point, it has moved ‘backwards’ from its pre-stall position which was near the front end of the wing.