Because it is very inert ough only in aqueous salts electrolysis and it conducts electric current very well also it has a very high melting point, in molten salts electrolysis the gases evolved corrodes the graphite rods therefore they are not so inert. For example electrolysis of water the graphite electrode remains intact whereas in electrolysis for extraction of aluminium the graphite anode is degraded by the oxygen formed.