Why water heaters fail
Sediment from hard water settles in the bottom of the tank, insulates the burner from the water and slowly cooks the tank. Anode rods wear out and stop protecting the steel. On gas units, thermocouples, flame sensors and venting problems are common; on electric units, elements and thermostats fail.
Many of those parts can be repaired. A leaking tank cannot, and that's usually when replacement becomes the only option.

