Bacterial rot is not the only thing that trees can turn into: their carbon can enrich the soil and be consumed by insects, fungus, lichens etc that goes onto feed higher species on the food chain. On top of that, rotting trees is fantastic habitat for animals, which are also made of carbon.