Below is an electric water heater with an installation that is close to right. But close is not good enough. There is a temperature pressure relief valve and the drain line from it is even routed down and out of the home. And the lower section of the drain is CPVC tubing which is a plastic that is approved for hot water. If you look at the vertical section that goes up to the valve, well that is plain old PVC. PVC works with cold water but is not approved for use with hot water and that includes at the TPR drain. This tank requires a qualified plumber to come in and upgrade the TPR drain. A TPR drain should be 3/4" pipe or plastic tubing and must be rated for hot water. Around here we see copper and CPVC in this application. Also, the drain cannot be a flexible tubing of any type, including copper flex that might be bent in a manner that would change, or get away from, the level to downward slope that is mandatory for safety. A TPR drain cannot go up for even one teeny weensy centimeter.

Steven L. Smith
Bellingham WA Home Inspections

HHmmmm, That is a bummer. At least the PVC is white like the rest f the pipe and fashionably matches the water heater for style.
Sean Allen