It is advisable to be done every 5 years. Some earlier tanks do not have an anode. Saxon tanks because they are copper. Also very early tanks which were made and imported from Germany. I have seen these still operating after 40 years. Saxon tanks seem to blow after 25 years.
The ones with anodes are made of steel and enamel coated. However the water does contact the inner tank metal through tiny cracks that develope over time.