At a cookout, why do people wait until the fire is mostly coals before toasting marshmallows? The reason I usually heard was that it's a more stable heat. To this day, I may not know why marshmallows are toasted over coals, but I did recently learn the chemical stages burning wood goes through in the course of a heart-warming evening.
In many ways, fire is the reverse of photosynthesis, combining organic molecules and oxygen to create carbon dioxide, water, and heat. Fire, then, is a much more evocative way of unleashing the power of the sun as opposed to, say, eating a salad. The reason plants don't usually spontaneously combust is that fire's chemical reaction has a high activation energy, so fuel needs to be heated to a certain point before the reaction becomes self-sustaining.
As plant matter is heated, volatile organic gases are released and combust, forming the visible flame associated with a roasty-toasty campfire. The gas is eventually all burned and the fire moves to the 'glowing' stage in which the remaining solid part of the plant matter burns as charcoal. Once that's done, all that remains is ash.