Corrosion in water heaters is associated with the passage of minute electrical currents which travel through the metal and water. Corrosion takes place on the anode which is where the current releases ions to dissolve in the water.
Cathodic areas develop at other sites (the tank walls) where the circuit is completed. Provided the anode is still functioning correctly no corrosion can or will take place.
Once the anode stops working the steel tank will react with any dissimilar metal, particularly non-ferrous metals such as the copper element and brass plumbing fittings. Once this occurs the water heaters tank becomes anodic and corrosion(rust) commences.