Why do they use graphite electrodes in the Hall–Héroult process? 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.
According to this source, graphite is used as anode material because carbon is easier to oxidize than $\ce{O^2-}$. The anodic oxidation of carbon

$$\ce{C + 2O^2- \rightarrow CO2 + 4e-}$$

proceeds more efficiently than the oxidation of $\ce{O^2-}$ at an inert anode

$$\ce{2O^2- \rightarrow O2 + 4e-}$$

$\ce{C}$ is a much better reducing agent than $\ce{O^2-}$ whose oxidation state is not changed in the reaction with graphite. As a consequence, anodic current density and the deposition rate of aluminium at the cathode will increase.