system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: If calories in/out is a law, then how does insulin resistance cause weight gain?

How does insulin resistance cause fat storage if those calories consumed need to be burned in some way anyway, according to the law of thermodynamics?
gpt
Imagine a creature that burns two apples worth of energy a day to survive. If it eats less than two apples, it'll feel hungry.

Without any insulin resistance, all the calories from the apples it eats will transfer fully to the cells in the body that require energy so when the creature eats two apples, it is content.

Now, imagine that the creature has insulin resistance. This makes it difficult for the creature to make use of the apple's energy. Imagine that it has a 50% insulin resistance so that only half of the energy from the apples goes to the cells that need the energy. It eats 2 apples but only 1 apple's worth of energy goes to the body. 

The creature still feels hungry so it eats two more apples. Only then can the body feel satisfied because the energy of half of the 4 apples goes to power the cells in the body due to the insulin resistance.

But what about the two apple's worth of energy that was not processed by the cells due to the insulin resistance? The body does not like to let go of nutrients so much of the energy from the apples will be processed into sugar in the blood. The excess sugar that is not being pushed into the cells due to the insulin resistance will circulate through the blood and causes damage throughout the body. The increased blood sugar is is one of the major symptoms of diabetes. Since the body did consume more calories than was normal, some of the excess blood sugar will be converted to fat. As the days go on, that excess fat will cause weight gain.

EDIT: Added some more information about diabetes in the last paragraph.