I wouldn't take this diagram as being scientific or to-scale. It is an artists rendition of a diagram that has been copied and repeated many times, some small details get lost in translation.
In this diagram, in the first two charts, the blue region represents the area of supersonic flow. However, in the third diagram, they've switched meaning and the blue area is subsonic flow. Very tricky.
The only place a shock wave will be perpendicular to the flow is along the stagnation streamline. All the other streamlines, the shock helps to turn the flow, and it takes an angled shock to turn the flow.
There is a second set of shocks at the trailing edge of the airfoil. The bottom surface trailing edge flow is about horizontal, and the upper surface TE flow is down about 10deg. After the trailing edge, these two must be parallel (and the pressures equal). So, the top flow will turn a few degrees up, and the bottom flow will turn a few degrees down. Since the flow before the trailing edge is supersonic, it requires a shock wave to make this turn happen.