It can also be caused by a bad thermostat. The lower thermostat on the WH in my house was latching intermittently, and the temperature was sky rocketing.
Since I have a tempering valve to control the actual temperature to the house, I was missing the rise in temperature. And, would occasionally see some water in the pan.
I thought the water tank was starting to leak, so I bought a new one. When I went to install it, i found the lower thermostat latched, and the TPV was weeping.
Bought new t-stats, and fixed the problem. New tank is still in the box in the basement. I figured that with the old tank being fifteen ears old, it will go, sooner than later. I should install the new one this winter when things are slow at work.