A dead trunk looks like waste if you are thinking about timber. In the woods it is a slow pantry. Fungi draw the energy out of cellulose and lignin. Beetles follow the fungi. Salamanders use the damp space under the bark. Woodpeckers come for the insects, and later for the cavities in wood that has lost its hardness.
Mark Harmon and colleagues gathered this natural history in a long 1986 review of coarse woody debris. A forest cleaned of every fallen stem is poorer in species, and often drier at the soil surface, than the same forest with its logs left in place. Rot is the process, not the problem.