Why is the standard enthalpy of formation of diamond not zero?
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.