Corrosion, scale, and sediment are the enemies of your water heater. The best way to reduce water-heater corrosion and scale is to keep the water temperature at or below 120?F. Hotter water makes more scale fall out of solution and cling to the elements and tank of your water heater. Hotter water is also more corrosive. Your water heater has a sacrificial anode that sacrifices itself to the weak acid in the water so the acid won’t attack the tank.
If you have soft water, you might want to replace the sacrificial anode when the water heater is 3 to 5 years old. That would help the water heater last more than ten years. If your water has a lot of sediment, you’ll want to drain water out of the tank bottom until it flows clean several times each year. Otherwise the tank fills up with sediment which occupies the tank’s volume and interferes with water heating.
Electric water heaters burn out their elements when the elements get surrounded by sediment or scale or else when they corrode. Gas water heaters, filling with sediment, first lose capacity to heat water quickly, then start making noise, then fail as the metal in the tank overheats. The softer the water, the more corrosion is a problem. The harder the water the more scale is a problem.
The Homeowners Handbook to Energy Efficiency contains simple, practical energy-efficiency ideas.