The "XLR" connector is also known as a "3-pin" because it has, well, three pins. The third wire gives an XLR several advantages.
1) You can run an XLR cable for hundreds of feet without any significant loss of signal. Conversely, two-wire cables are limited to something under 50 feet.
2) XLR's are less likely to pick up outside interference than two-wire cables.
3) XLR cables have a little lock built in so they won't accidentally pull apart.
Because of these advantages, all high-end television production uses XLR cables for audio. The problem with XLR connectors is that they are big and bulky. Smaller gear needed a more compact solution--and thus the increasing use of the RCA and other connectors.