Answer
Energy can't be created or destroyed but it can be changed from one from to another, a percentage of that energy is lost as heat.
Law of Conservation of Energy
The principle you're referring to is the law of conservation of energy, which states that energy cannot be created or destroyed in an isolated system. Instead it can only change forms in which some is converted into heat. This is because real life processes can be inefficient and energy will be lost as a result of various factors including metabolic functions.