Why is the standard enthalpy of formation of diamond not zero? Why doesn’t diamond have $\Delta H_\mathrm{f}^\circ=0$, when graphite does? Is it something to do with the definition – diamonds can’t really form at STP, even though it is naturally occurring?
You are on the right track - diamond is not the thermodynamically stable carbon phase at STP. Taking two figures from A.T. Dinsdale, 'SGTE Data for Pure Elements', CALPHAD 15(4) 317-425 (1991) one sees:



and



Since graphite is the thermodynamically stable phase of carbon at STP, it is usually selected as the reference phase so it has $\Delta H^0_f = 0$. In the reference above, both absolute Gibbs free energies, as well as free energies with respect to the stable phase at STP, are given for most elements.