Discuss the significance of grounding in electrical systems and its role in ensuring safety and preventing electrical hazards.