A calorie is a calorie is just too simplistic. I used to hold that viewpoint, but I think now reality is more nuanced.
1) A ketogenic diet is wasteful by nature, you excrete some percent of the calories you consume.
2) It completely ignores the effects of hormones. You need insulin to store fat and build muscle. A diet that triggers more insulin may result in storing more fat. This does not violate the first law of thermodynamics - this energy will either be burned from your fat stores, or compensated for by reducing your metabolism. I expect in reality a combination of both.
1) A ketogenic diet is wasteful by nature, you excrete some percent of the calories you consume.
2) It completely ignores the effects of hormones. You need insulin to store fat and build muscle. A diet that triggers more insulin may result in storing more fat. This does not violate the first law of thermodynamics - this energy will either be burned from your fat stores, or compensated for by reducing your metabolism. I expect in reality a combination of both.