In the Hall–Héroult process of extracting aluminium from aluminium oxide, the electrolyte is a liquid mixture of cryolite $(\ce{NaAlF6})$ and aluminium oxide $(\ce{Al2O3}).$ The cathodes and the anodes are made of graphite.
During the electrolysis process, aluminium is deposited at the cathode and oxygen is liberated at the anode. Some of this oxygen reacts with the carbon in the graphite to form carbon-dioxide, thus slowly burning away the anodes. Thus, the anodes have to replaced periodically.
But if this is the case, why do they use graphite anodes at all? Why don't they use anodes of some other, less reactive material? I'm pretty sure there are many out there that would fit the bill.