>> soil microbes transform it into carbon dioxide and methane
> rot
That's what the previous comment just said.
Decomposition of plant matter occurs in many stages. It begins with leaching by water; the most easily lost and soluble carbon compounds are liberated in this process. Another early process is physical breakup or fragmentation of the plant material into smaller bits which have greater surface area for microbial colonization and attack. In smaller dead plants, this process is largely carried out by the soil invertebrate fauna, whereas in the larger plants, primarily parasitic life-forms such as insects and fungi play a major breakdown role and are not assisted by numerous detritivore species.
The same way all these hydrocarbons got there, organic matter got there (at some previous time or through processes that moved it there) and then, under the right conditions, microbes decomposed it.