Why do endotherms need more food than ectotherms?
Endotherms also called warm blooded animals have the ability to regulate their body temperature by themselves. 


If the endotherms are in a cold place their body increases the metabolism and generates more heat. This will compensate for the cold outside. 
In a hot region the body metabolism is tuned down (this is not as efficient as the adaptation to cold region - as the metabolism can't be turned down below a certain limit - this will result in death) a little and heat generation is somewhat reduced. The second and more efficient mechanism is the heat dissipation by sweating and through skin (directly).


Ectotherms on the other hand, do not have efficient temperature regulation systems. 


In warm regions when the temperature is high, the ectotherms seek shade and low-temperature areas to prevent over-heating
In cool regions they seek sunlight and expose themselves to the sunlight for warmth. For the same reason, they can also search out and stay near fire pits, campfires etc...


So when we calculate the energy demands, the ectotherms need more energy as they regulate their own metabolisms to match the need. 

The increase in need for energy in hot condition maybe due to:


The extra-processes that are regulated like sweating, increased peripheral vasodilation - thereby increasing circulatory rate (increased work for heart)
This thermo-regulation inturn affects other processes and systems like electrolyte and water balance, excretory system, endocrine system, thrist, etc...


During the cold season increased metabolism itself is the main cause for increased need for energy.