Why does the exit pressure have to match the back pressure?
Source: Converging/Diverging Nozzle Applet.
Gas flows from the chamber into the converging portion of the nozzle, past the throat, through the diverging portion and then exhausts into the ambient as a jet. The pressure of the ambient is referred to as the 'back pressure' and given the symbol p$_b$.
Oversimplified: The back pressure is set to match the exit pressure to avoid turbulence and inefficiency, much as an aircraft wing is more efficient when it is a particular shape; though a variety of less efficient shapes are also sufficient to allow, for example, toy planes to fly. In the case of a rocket one can control the burn to cause the flow to operate in the most efficient zone, much as a diesel engine operates better at a particular rpm. In the case of a rocket it is not gearing in the nozzle but turbulence, though gearing in the pumps becomes a consideration with pumped liquid fuels.
[Non-simplified] You can only lower the back pressure to a certain point, after which the nozzle becomes choked; no further lowering of the back pressure, even to a vacuum, will increase the flow.
As the pressure increases, either when burning solid fuel or liquid or simply pumping water, the shock waves act upon the insides of the nozzle creating a non-optimal flow and wear.
At the design condition the back pressure should equal the pressure at the nozzle exit. In this case, the waves in the jet disappear altogether (figure 3f), and the jet will be uniformly supersonic.
What if it did not?
If you lower p$_b$ enough you can extend the supersonic region all the way down the nozzle until the shock is sitting at the nozzle exit (figure 3d). While that provides a good flow velocity within the nozzle the flow in the jet (outside the nozzle) will still be subsonic.
Lowering the back pressure enough so that it is now equal to the pressure at the nozzle exit causes the waves in the jet disappear altogether (figure 3f), and the jet will be uniformly supersonic. This situation is referred to as the 'design condition'.