Let's look at a very simple "ecosystem", cows and grass. Imagine there is 1000 kilograms of grass available. This can support about 100 kg of cow. There's your 10% figure, but mass here instead of energy.
When the cow eats the grass it must break down the food to get both matter and energy. Everytime energy is transfered, some of it is "lost" as heat. So as the energy in the bonds of the molecules of the grass are transferred into energy in the bonds of molecules making up the cow, much of that energy is wasted, radiated away from the cow as heat. The cow also has many tasks to perform that also use the energy in the grass. It has to walk around grazing, chew, make more cows, etc. By the time all this is accounted for, the cow has used 90% of the energy in the food to provide for its own energy needs as well as the waste.
In the process of breaking the grass down for energy, the cow transformed the food, from which it extracted the energy, into carbon dioxide and water. The carbon dioxide was breathed out into the atmosphere. Only 10% of the matter in the food remains to add mass to the cow. This is why the cow only put on 1 kg of weight for each 10 kg of grass.
So that cow, having only retained 10% of the matter that was in the food, only has 10% of the energy since energy is stored in the chemical bonds of the matter.
The 10% rule is an approximation. A number of my students were in FFA (Future Farmers of America) and raised animals. One of the tasks they were required to do is keep track of the weight of feed and compare it to the weight gain of the animal. Many that I spoke to did better than the 10% but much of that was probably due to the higher quality of the feed they used.