The short answer is that the speed of sound is the fastest the air can get out of its own way, so if you try to move air faster, it builds up and gets out of the way at the fastest speed it can: the speed of sound.
Slightly longer: An airplane (or anything else moving through air) is continuously disturbing the air all around it - building a pressure profile - and this disturbance propagates and creates itself at the speed of sound. When the airplane reaches the speed of sound, the air in front of it can no longer get away from the plane to build that pressure profile because to do that, it would have to move faster than the speed of sound. So it piles-up at the leading edge and propagates away along a straight line, who'se angle is determined by the speed of the object vs the speed of sound. That's the shock wave.