This can be attributed to the Second Law of Thermodynamics which talks of Entropy. Entropy is disorder. What is heat? Heat is in fact used to quantify entropy. For any process to occur, the entropy of the whole system must increase. That means the process should result in an ultimate increase in disorder - which can be thought of as an increase in temperature since this increase in disorder is the 'heat production' you talk of.
Heat is not aan forminternal form of energy, it. It is rather energy in transit, or in fact a means for transfer of energy. Don't get me wrong here - heat definitely is energy but I would prefer it being thought of as a vehicle rather than a store. The other vehicle being work.
Heat is transfer of energy in a very crude and randomised manner. Providing heat, increases the temperature and increases random motion of the molecules. Hence you can attribute the heat released - unusable form of energy - to an increase in entropy.