Is there possibly a short circuit in the water heater that may have energized the pipe? Heating element buried in sediment, perhaps?