We don't have an intake of 'thousands' of kcals daily....only about 2000-2500 on average.
This energy is used up in maintaining our daily functions that our body carries out every moment, like pumping action of our heart, thinking of our brain and likewise every organ, in fact every cell of our body utilizes this energy only.
therefore, it can not be said that this energy is 'wasted'. It is used in maintaining all our life processes.
This is what we call our 'daily energy requirement'...
If however we intake more than this value, we can gain weight....this is where the extra energy makes us put on weight.
And if our intake is lower than this value, we would lose weight.
So, No energy is 'wasted'.
You can refer to one of my hubs about this question. May be it can help you understand it better.