Ok, if the pipe provides the ground (EGC) for the receptacle, that means that whatever else is connected to that pipe would be grounded. But if the water heater did have the the dielectric union or plastic, then the fault still could not find a path back to the panel.
So,
1) pipe provides path back to panel, fault in water heater would cause the breaker to trip if no if no dielectric union-plastic-high resistance. This would have happened whether the receptacle EGC was connected or not.
2) If the water heater has the dielectric union-plastic-high resistance connection, then no path for fault to get back to panel.
BTW, we only need "
cold" water heaters here!