Fact 1: being burried under soil and mud changes vegetation into peat through extreme heat and pressure in a swamp over a long period of time. 
Fact 2: Often, the soil consists of mats of very acidic, semi-decayed vegetation, such as peat.
Decayed vegetation turns to peat in a swamp over periods of time.