The diagram given below shows an electrolytic cell used in the extraction of aluminium:\
Why is it necessary for electrode B to be continuously replaced?
The electrode gets oxidized by the oxygen evolved at electrode B
The electrode B, made up of graphite, gets oxidized by oxygen released at the anode forming CO which further forms CO2. Hence electrode B (anode) is replaced time to time.