Why does an XLR connector use 3 pins instead of two
The cable connector body must contact the chassis connector body, which is generally metal, conductive, and bolted to a conductive metal case. Therefore the only choice for the connector body is a connection to the equipment case.

This (the equipment case) is obviously grounded - to safety earth. There is no choice about this.

However it is common for safety earth connections to form ground loops or be connected to a noisy earth point shared with, e.g. multi-kilowatt triac dimmed lighting systems (i.e. spiky 50Hz waveforms.)

So audio equipment design must separate the two functions of an earth connection: safety, and noise reduction. 

Connect external metalwork to a safety ground, without worrying about the noise on it.

Connect signal ground to a separate low noise ground, without worrying about whether it is fault-current rated.

And this dictates the need for a separate pin for signal ground connections. 

When I worked in broadcast audio, "pin 1 is ground" was one of those rules we didn't even have to think about.

Consider many pieces of equipment connected to an audio mixer by XLR cable : there may be many signal ground connections - yet we must eliminate ground loops. There are options on some of these boxes to "float" the signal ground - isolate it from safety ground - using the signal cable to provide a signal ground reference from the mixer.