What is the function of earth wire ?Why is it neccssary to earth the metalic body of electric appliances

What is the function of earth wire ?Why is it neccssary to earth the metalic body of electric appliances

The main function of the earth wire is to prevent live wire from overloading and absorbs the excess electrons & flows to beneath the ground . It is necessary because it prevents the electrical appliances from damage and absorbs the excess electricity from appliances.