When an electrical appliance is in use, current flows from the service panel to the device. A grounded wire provides a safe return path for any excess or unused electricity, ensuring it is directed back to the service panel. This grounding mechanism prevents potential hazards, such as electric shocks or fires, in the event of a short circuit by safely diverting stray current away from the appliance and into the ground.