Why is grounding necessary in a circuit?

The bare (or green) grounding wire is for user safety. If there is a fault inside an appliance, a wire can become disconnected and touch other parts. If it is the "hot" side of the circuit, the parts can become energized (whether or not the switch is on). This is a dangerous hazard because a person can touch the appliance, while being grounded by touching something else, and "complete" the circuit; namely electrocution. With a safety grounding wire, there is a better chance that any parts a person could touch would be connected to the grounding wire, and thus the same hot fault would cause a short circuit to trip the breaker.