system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: If weight gain/loss is just a matter of calories in and out, why is it so hard to keep weight off?

I keep hearing that when it comes to losing weight, the most important thing to remember is that calories in must be less than calories out. That makes sense.

I am overweight, but I'm also holding steady. I haven't significantly gained or lost weight in 5 years, so presumably my calories in equal my calories out. That makes sense.

I recently decided to get in better shape, so I spent a few months eating less (reduce calories in) and exercising more (increase calories out). It worked, and I lost weight. That makes sense.

But then I went back to the same diet and lifestyle I had before. Which was (presumably) equal calories in and out. But rather than staying steady, I gained the weigh back. That doesn't make sense.

So why can't I just lose a bunch of weight, then go back to my balanced calories in-out lifestyle to keep it off?
gpt
When you lose weight, the amount of energy your body needs also decreases, as you have a smaller body. A person weighing 300lb/150kg needs more energy to maintain basic body functions than a person weighing 150lb/75kg. So you have to adjust your basic caloric intake to your smaller energy need.