Why connect the gate of a MOSFET to ground?

That is for reverse-polarity protection. It behaves almost like a diode but with very low voltage drop.

What is missing from that schematic symbol of a PMOS is the body diode which points from left to right. If the voltage at the source is positive relative to the gate the PMOS (initially facilitaed by the body diode conducting) then the PMOS turns on and the voltage drop across the source-drain falls to even lower than the forward drop of the diode.

But note that this isn't quite like a real diode. A real diode will stop current flow even if you connect a battery on the right side. This PMOS will not since the only thing required for it to conduct is that the source terminal voltage be more positive than the gate terminal voltage, which a load sending power back toward the supply can do (i.e. capacitors during shutdown of the power supply).