Heater tanks are typically constructed of steel. Since metal tank carries water, it has to be protected against the aggressive water action. There are two ways how to defend the tank from the rust: with the anode rods and tank lining. Between anode and cathode, two metal surfaces, a low resistance electrical circuit is created, where water acts as a medium, providing the cathodic protection to the inside surface of the tank. This is protective current that keeps metallic ions at the cathodic surface (metal tank) from corroding. As the heater tank is cathode, in order to slow down the corrosion, manufacturers are adding another metal element, water heater anode rod. The rod is made with a higher current potential than other metal elements in the heater, to allow galvanic current to flow from the rod.
Water heater anodes are sending electrons to the metal tank and release positive hydrogen and metal ions to the water. During such process the anode rod starts depleting, sacrifices itself to protect tank and extend its life.
This is the reason why it is called sacrificial rod or sacrificial anode.