Because the guitar is unbalanced with a high inductance coil (which is usually poorly shielded) exposed to EMI along with all of the metal bits which includes the strings of course. So if 0V didn't have some relation earth, you would get noise from being bombarded with EMI all around us. The metal bits could charge up relative to earth and cause popping noises as you touch and release the strings.
But there is also a safety reason in that there are many opportunities for an uncontrolled voltage to contact that 0V, such as through a guitar amp or any of the other unbalanced guitar gear, in which case it might be good if there was a better path to earth than through your body and into the shield of a mic or some other bit of earthed metal you happen to touch.
Yeah - I understand that a passive guitar pickup is a hi-Z transducer and this inherently susceptible to noise. But there is nothing 'special' about the planet Earth in relation to this if it is not part of the connectivity. The basic requirement is that the conductive parts - strings, bridge etc are connected to a low impedance reference voltage. Typically this is the return of the power supply. Eg think about a street busker running their kit from a car battery. No actual Earth connection. The metal parts are connected to the battery negative.
And you do get noises if you lose contact with the metallic parts then remake contact. Because you are acting as a noise source then not doing so when you remake contact.
I see safety related comment. But on a train atm and the bumpiness is making the touch keyboard on phone a bit too much of a challenge now
Cheers.