The thing to remember is that pipes can carry hazardous voltages and or currents into a property and out of a property.
Also accept that true ground potential imported into a building can be hazardous if the safety "earth" of the electrical system is not at true ground. As can easily happen since in many installations the safety earth is in reality the same potential as the incoming neutral of the power supply.
Hence sparks and current flow when a metallic service pipe is connected to the safety "earth" of the installation.
That said on balance and for the vast majority of homes the system does work and is safe. The few exceptions, such as metallic service pipes providing low impedence connections to true ground, do create problems.