Here's why:
* Abundant plant life: The Carboniferous saw the rise of vast swamp forests with giant ferns, horsetails, and lycopods. These plants produced large amounts of organic matter.
* Low oxygen levels: The atmosphere at the time had lower oxygen levels than today, which hindered the decomposition of dead plant matter.
* Geological conditions: The Earth's tectonic plates were in a configuration that favored the formation of extensive swamps and deltas.
These factors combined led to the burial of enormous amounts of plant material under layers of sediment, which eventually transformed into coal under pressure and heat over millions of years.