1000 calories of pizza and 1000 calories of broccoli is the exact same from a weight gain point of view.
They are not the same because different bacteria eat different things, and some of those bacteria are associated with weight loss and gain. We can quite literally feed mice akkermansia muciniphila and cause them to lose weight without changing their caloric intake.
Also 2000 calories of pizza is doable in one sitting, and you won’t feel very full so it would be easy to eat more, but good luck eating 2000 calories of broccoli in a day, the volume of food is much higher.
With this you admit that there’s more to it than just CICO. If you eat 2000 calories and still feel like you’re starving then of course you’re going to fail your diet. What you eat is extremely important for a variety of reasons.
I’m not sure I’ve ever encountered a dietician that recommended counting calories for weight loss or health. They all say to eat healthy foods, avoid junk, and to eat when you’re hungry, stop when you’re not. And it turns out eating healthy is exactly what fosters the gut bacteria associated with healthy body composition.
I’ve used it for conceptualizing what I want, because I do my own art and also have aphantasia.