Our water is very hard and the gas powered WH builds up something like an inch of sediment a year. I got lazy for a while and when I finally got around to it could hardly drain the tank because the sediment had accumulated to above the outlet hole. Visually confirmed - looked in through the end of the drain and there was a wall of wet chalk fragments at the tank end of the pipe. Anyway, no flush here for 25 years would result in something like 2 ft. of sediment, and a WH that probably couldn't effectively heat water.
If the water was soft there wouldn't be much sediment, but instead it would eat the anode in a short time, and then the tank. There are electric anode rod devices, which are supposed to last a very long time, like this one:
https://www.homedepot.com/p/CORRO-P...ps-Corrosion-20-year-warranty-96387/327770961
Problem is, those little wall wart power supplies always crap out eventually and the owner might not notice, then the tank would fail. Still, it is at least theoretically possible for one of those power supplies to keep working 25 years. Any chance one of those is installed on your tank?