All exposed metal should be "grounded" by connecting it to a properly designed low impedance ground circuit in order to ...
Stop fault energy flowing into YOU or to other unintended places. The grounded metal will provide a much lower impedance than you will. Earth potential rise should be lower to much than phase voltage and you should at worst feel a reduced shock for a very short period.
Assist fault detection & interuption equipment to work properly (or at all). [eg fuses, circuit breakers, ground fault interrupters/earth leak circuit breakers etc.] A large amount of current, greatly in excess of the usual design maximum, will glow from "phase" to ground and cause the fuse or circuit breaker to interrupt the voltage.
If an eath leak circuit breaker / ground fault interrupter is used - allow nearly complete protection against electric shock.
The main objects in power distribution to "appliances" (let's use that to refer to everything from large fixed wired things to small portable devices) are
(1) To make the energy go to where we want it
(2) To stop the energy going where we don't want it.
(3) To detect when energy goes where it shouldn't and stop it doing so
(4) To maximise efficiency of energy transfer.
(5) To keep users safe and surroundings free from damage.
5 is arguably a mixture of 2 & 3.
The interconnection and "earthing" of all exposed metals is related to 2 & 3 & 5
Point 2 - Stop it going elsewhere: We don't want energy to leave the appliance - eg into users, into other equipment, into the ground (except a temporarily as part of ensuring 3 & 5. If there is a path to ground via a ground lead from a broken mains wire, or via failed insulation or an incorrectly operated switch etc then the energy cannot get out into the world.
If fault energy flows into a case and then to ground via a low-impedance-by-design via ground lead oath, then it is very unlikely to flow through you. This is usually regarded as 'a good thing' [tm].
Fault energy flows into the case or chassis and then via the ground wire to ground, thereby completing the circuit. What happens then is covered by point 3.
Point 3 - detect and stop fault energy flow. Energy flowing via a ground lead is not meant to be there. An AC mains or "grid" feed to an appliance is designed to be able to provide far more current than it is intended or designed to handle. This is so that the voltage drop will be low under normal use conditions. Ground circuits are also designed to be able to handle in the sort term far more current than the mains circuit is designed to provide. So during a phase (= live wire) to ground or to chassis or to metal case fault, the current flow via phase and back via ground will be far larger than it is designed to be in bnormal use. This means that the fault condition is easily distinguised from normal operation - so that objects with no more brains or capability than a piece of wire - commonly termed a "fuse" - can detect and terminate the flow.
Visitors have arrived .... more soon ...