Most storage hot water systems have an anode in them which is designed to corrode away, instead of the tank. Most anodes last up to about 4 years. Once the anode is gone, the tank will start rusting, and then it's only a matter of time before it fails and you will need to replace the whole system - it is not feasible just to replace the tank. Replacing the anode can keep your hot water system going much longer.
If your hot water system is more than 4 years old, the anode should be checked.
A new anode, fully installed, is typically less than $200, and many of them much less than that.