What's the function of ground wire anyway?
Keeping the example to mains in a house for simplicity...

UK mains consists of three wires: L(ive), N(eutral) and E(arth).

The mains electrical circuit has electrical current flowing between Live and Neutral.

At the local sub-station, Neutral is connected to Earth and Earth is connected to the ground.

In a house, Earth is connected to the metal cases of electrical equipment like cookers and to water pipes, radiators and so on.

If the mains accidentally connects to these metal cases or anything else earthed, a high current flows from Live to Earth, back to the sub-station and thence to Neutral.

In a very short time, a fuse in the mains Live should be overloaded and blow, cutting off the Live supply and rendering things safe. There is a 1, 3, 5 or 13 A fuse in every mains plug.

In the old days, the mains supply to those sockets would have a 30 A fuse in the  fuse box where the house's incoming mains first goes through. That would blow if the mains plug fuse didn't. However, you needed to draw all that current to blow the fuse and if you were the thing causing the short-circuit, you might be seriously harmed or dead by the time the fuse went.

Nowadays, house 'fuse boxes' must use Residual Current Devices (RCD) instead of fuses. These are a sort of current-detecting switch and cut the mains supply to the socket when the current flowing out from that Live is sufficiently different to the current coming back on that Neutral. If Live current is being shorted down to Earth and heading off to the sub-station, it's not coming back on that Neutral.

RCDs are very fast-acting and also very sensitive, tripping on a current imbalance between Live and Neutral of milliamps. These means that far less harmful current flows off through a fault or short-circuit and for far less time, causing far less harm to people caught up in that fault.