The purpose of earthing, also known as electrical grounding, is to keep people from touching an electrical hazard. Electrical grounding is also used with electronics to create less noise and to help with surge protection.
This electrical grounding can be used above or below ground. The goal is to create a way for the electricity to flow back into the electronic device or object instead of into an unsuspecting person. For outside work, there is often a ground rod that is used to connect the wire to the earth and also to once again make sure that unwanted electricity does not move into a person. Without grounding, electrical wires and electrical objects would be highly dangerous.