Here's why:
* Igneous rocks form from the cooling and solidification of molten rock (magma or lava). Graphite doesn't form from molten rock.
* Sedimentary rocks form from the accumulation and cementation of sediments. While graphite can be found in sedimentary rocks, it doesn't form directly from those sediments.
* Metamorphic rocks form when existing rocks (igneous, sedimentary, or even other metamorphic rocks) are transformed by heat, pressure, or chemical reactions. Graphite forms when the carbon in coal or other organic matter is subjected to high temperatures and pressure, causing a change in its crystalline structure.
So, while graphite can be found in other types of rocks, its origin lies in the metamorphic process.