LOL- mine is still kicking at over 30. In most areas the #1 determinant of tank life is water quality, which varies all over the map in SE MI if you are not on the Det or other large city system. Ten years is probably about right for many, but if you are serviced by a municipally softened system you should get a lot more than that. That said, how long a heater is actually likely to last is not the same question as the economic break even point for servicing it!
Comically enough, I experienced the other extreme of that decision process when the warranty holder decided to replace rather than repair my *2* year old dishwasher! I kept the dishwasher, the warranty money, and fixed it myself for <$100. 🤷♀️