It's more complex than just calories in - calories out. Just to complete your simple equation, what you're saying is:
calories in - calories out = fat stored/burned.
So for calories in == calories out, stable weight.
For calories in > calories out, weight gain.
For calories in < calories out, weight loss.
The mistake that most people make is that they assume that the left side is independent of the right side. We can rewrite the equation as:
//Assume that a negative fat stored is fat burned
calories in - fat stored - calories out = 0
OR
calories in - fat stored = calories out
Now in your original equation, assume that the person needs 1000 calories for their body to function normally. Also assume that the person eats 1000 calories a day. In your equation, since you assume that fat storage is a function of imbalance between needs and consumption, you get 0 fat storage.
However, in reality because of an insulin imbalance, what happens is this:
1000 calories are consumed.
200 calories are stored as fat.
This only leaves 800 calories to be used by the body. But wait, the body requires 1000 calories to function normally! Well there's two ways to compensate for that, either the person will consumed an additional 200 calories to get the body functioning normally, or the body will adjust it's needs, reduce the energy and movement of the individual, sleep more, etc.