A compressor is grounded to ensure that the current is diverted into the ground in case of a major electrical fault. A grounded compressor ensures that there is no damage to any property or person because of electrocution. A grounded compressor also prevents any health issues if there is an electrical leakage.