I was very overweight 20 years ago and had a light bulb moment. I realised that me being fat or thin was in my own hands and nobody else's. A lot of mental things started shifting and I lost 4.5 stone. I developed lots of habits and learned to endure hunger and put boundaries around when I could have treats.
At the same time, I also developed a taste for fruit, veg and water and learned how to make healthy swaps. I started treating myself as someone I really wanted to invest in and used a lot visualisation and psychological warfare against my food addiction. That's what it is. For a long time it was a constant battle between my cravings, my feelings and my control over what I was putting in my mouth.
Was it a simple case of calories in/calories out? Very much, except it was like I had to complete an assault course several times a day to keep the calories out. It was a very complex, challenging and at times overpowering battle but after a while, everything became normal and the sense of the fight gradually became peaceful. I didn't eat treats during the week and that was that. I stopped eating when I felt full and that was that. I enjoyed salads and chopped fruit and generally started living like a thin person, because that's what I was.
I was a size 8 and spent my twenties living for the weekend, going clubbing in little dresses and loving fashion and beauty. It brought me a lot of shallow, superficial joy and I'm so glad I pushed through.
I kept the weight off for ten years, then got pregnant 3 times over the next decade, getting back down to a size 8 between each baby. I'm now finished my family and am back down to my size 8s.
In theory, yes, it absolutely IS as simple as calories in/calories out. However, the brain is a very powerful machine, deeply tied to the emotions, and food carries huge psychological capital for people who can't stop eating.