Decomposer's role is to break down dead food. They basically eat it, then the dead food or the dead animal gets ground into the ground, and makes the soil good. Like worms, or fungi, mushrooms, etc. Rotten fruit  is not really wasted because 1) the decomposers eat it, and 2) it makes the soil good
        
                    
             
        
        
        
Energy derived from food is used to create ATP, an energy-rich compound