Conventional anode rods are fine for most, especially on municipal water (treated, pH balanced)... but sometimes well (or spring) water can be high in "clear iron", or even bacterial iron. Elevated magnesium levels will also cause problems. Electronic anode rods use a titanium or other non reactive metal to impart a small electrical charge to protect the metal tank (cathodic protection)... same thing happens using a sacrificial metal such as magnesium, aluminum or similar. The sacrificial metal dissolves, as the name implies, sacrificing itself to protect the metal plumbing components with lower reactivity than the sacrificial metal. The same principle is used on ships. It's an old tried and true technology. The electronic anode protection concept isn't new; been used in industrial applications for a long time - but it's a relative newcomer in the residential plumbing applications. I had to replace the anode rod in one of my new H20 heaters recently after suddenly having high levels of H2S (rotten egg smell) turn up in the water. I was shocked to find how fast the anode rod had degraded after only a year. Installed an electronic anode (titanium electrode), and so far so good. No more black Mg & Mn goo in the water or rotten egg smell... How long will it last? No idea. My guess is the anode power supply will die after a few years, but it has a status LED - so at least I will know if it's off. Without some type of cathodic protection on well water in my area, water heater lifespan is a few years at best. Good idea to check your anode rod periodically if on well water, but few do so.. and with good reason. Those things are TOUGH to remove without a high torque impact gun.
As to the water pressure, I try to keep my water water pressure under 60 psi at all times. Typical residential nominal pressure is 40-50 psi, though well pressure switches can vary much. Most people don't realize PRVs installed on city water supplies to houses eventually fail, and they always fail open. That leaves the house plumbing to see unrestricted street pressures, which can quickly damage water heater tanks & plumbing. Sometimes the glass lining will crack, which isn't noticeable until later... when the glass lining cracks, water contacts the bare steel tank, and rust rapidly eats it away. I believe newer tanks use a polymer coating inside, which will greatly improve on the tank's life span. Expansion tanks are now required by code in most areas in the US, and they are a good idea. Water expands as it heats, and the excess pressure has to go somewhere. The expansion tanks allows that, without undue stress on other plumbing components.
Agree 100% with Juliand, previous post. Test your water, at least to get a baseline. If on city water, it should theoretically be treated/balanced - but there is a huge variation in what is considered acceptable in municipal water quality. Even if the water from treatment plant is great and clean, the transport pipes may be made of cast iron - which degrades, leaving nasty rust particles and dissolved iron to contaminate your plumbing fixtures. That's aggravated by chlorination, which is common.
The 3 biggest things that I find help extend water heater tank life is (1) check and maintain correct water pressure (not too high) and (2) DRAIN and flush the tank as mentioned by Juliand. You would be amazed what collects in the bottom of your tank (it's not pretty!!). (3) install a simple cartridge filter on the main supply line coming into the house. It will preserve the life of all your plumbing devices.
Not a plumber, just my observations in the last 40 yrs of residential construction and maintenance. YMMV