The rule
Overtemperature protection is a safety layer on top of the normal thermostat. The code requires it for a water heater installation and for a hot water storage vessel installation, using an approved, listed device.
The code doesn't name the device. Its listing and the manufacturer's installation instructions decide what counts and where it goes. On common residential heaters it's built into the heater's controls or into the combination T&P relief valve, so for a standard replacement the factory-supplied parts do the job when they're installed as instructed.
Heaters that run on something other than gas get the same idea spelled out in Section 505.2: an over-temperature safety device in addition to the primary temperature controls, plus a combination temperature and pressure-relief valve.
On the job
- Use the relief valve and any limit device that come with, or are specified for, the heater. Don't swap in a generic valve with a different rating.
- On a boiler-fed storage tank or indirect tank, make sure someone owns the overtemperature protection. The tank doesn't have its own burner, so check what the boiler or the tank's kit provides.
- Leave the high-limit and relief devices as shipped. Jumping or bypassing them is the kind of thing that fails an inspection and hurts people.
The inspector and your city's adopted edition have the final word.