https://www.smithsonianmag.com/science-nature/what-happens-to-a-tree-that-dies-in-a-forest-180986121/Rotting logs turn out to be vital to forest biodiversity and recycling organic matter
...
Dormant fungi within the tree awaken to feast on it, joined by others that creep up from the soil. Bacteria pitch in, some sliding along strands of fungi to get deeper into the log. Termites alert their colony mates, which gather en masse to gobble up wood. Bit by bit, deadwood is decomposed, feeding new life along the way.
...
Wood-gobbling life forms, in turn, nourish other living things. Many beetle species munch on the spores, mycelia or mushrooms of wood-decaying fungi, while some ants specialize in hunting and eating termites. Estimates suggest that one third of insect species in a forest rely on deadwood in some way—and these insects are food for other invertebrates, as well as birds and bats. Rotting logs create excellent spots for tree seedlings to grow, and for animal nests, dens and burrows.
“It’s pretty clear,” Seibold says, “that this is a habitat type and resource that we need to maintain this part of life on Earth.”
...
As a log disappears, where does the wood ultimately go? Wood-eaters use some of the carbon for energy, expelling carbon dioxide—and farting methane, in the case of termites—as a waste product. Carbon also goes into building bodies; some termites use their lignin-rich feces to build nests and mounds. When these structures decay, some of the carbon is released into the air, while a portion stays on the ground, alongside leftover wood bits. Collectively, these leftovers become part of the humus of the soil, helping retain water and support soil-dwelling microbes, invertebrates and roots.
...
Earth system scientist Steven Allison of the University of California, Irvine, reckons that while most of deadwood’s carbon ends up in the air, some stays locked in the soil for more than a century. “Deadwood is really your friend,” he says. “You want more of it, and you want it to stick around longer.”