Here's why:
* Formation: Coal forms from the accumulation and compaction of plant matter (mostly trees) over millions of years. This process happens in swampy environments where dead plants are buried under layers of sediment.
* Igneous rocks are formed from the cooling and solidification of magma or lava.
* Metamorphic rocks are formed when existing rocks (igneous, sedimentary, or other metamorphic rocks) are transformed by heat, pressure, or chemical reactions.
While coal can be subjected to heat and pressure during the formation of metamorphic rocks, it's still classified as a sedimentary rock because its origin is from organic matter.