Not as long as you might think. They don't make 'em like they used to.
The first water heater in our home lasted almost 50 years. The one that replaced it is barely two years old, and it is down for the second time. We are waiting for FedEx to deliver a new control valve to get it back up and running.
The symptom is no pilot light. Typically, this would be caused by a defective thermocouple, but in our case the Rheem customer service rep admits that there was a design flaw in the valve itself, and the valve had to be redesigned.
Thermocouples have been around since the 1940s - the patent was applied for in 1941 - and they have been used in water heaters almost as long. Why they felt the need to redesign something that has worked that well for that long in beyond my comprehension.
It brings to mind the old adage "If it ain't broke, don't fix it."