It still comes down to calories in vs calories out. The reason it seems otherwise is because people mistake calories in as being measured at our mouths. But in reality, both calories in and out are a 'bottom-line' equation. After all the questions of satiety, dietary compliance, nutrient absorption/malabsorption and whether the body ramps up metabolism, increases heat or forces us to fidget via N.E.A.T, to burn any excess energy off, one is left with a number that is balanced against our actual/real caloric expenditure. An energy deficit will lead to needing to borrow from stored energy (fat and muscle bank), and an excess will allow one to make an energy deposit, to be used for another time.
Because we can't accurately measure the absolute calories in food, nor the energy that is lost through the various processes and inconsistencies, or the fact that us lay people certainly can't accurately measure our caloric expenditure (not to mention that none of this is neatly calcualated by the body in 24-hour time packages), it can seem like calories in/out does not compute. But Tannith is right when referring to thermodynamics. These are unbreakable laws of energy. Which is fortunate, because we'd never have survived as a species were it not for our ability to store and burn excess energy, at the appropriate times.