It isn't that simple though because that only tells you part of cause and effect. If I gave you a capsule that you could swallow that somehow was 100% nutritionally complete and you would require nothing else to live, you would still get hungry and want to eat. Would you be able to "starve" yourself just because you knew you were not "really" starving, you were just perceiving yourself as starving because every signal our ancestors evolved to associate with the need to eat was telling you otherwise?
Its long been said that Calories in - Calories out = weight gain. Its so simple and so correct in its simplicity but, it entirely misses that real picture, that we are not spreadsheets.
The bigger issue is that appetite is based on feedback loops, and if you don't satiate appetite, willpower isn't ever going to be enough to help most people.
This is, of course, where diet really comes in because....different foods have different effects on appetite, and its not always in proportion to their calorie content. If all foods with the same calorie content provided the same level of satiation, then drinking a soda would leave you as full as eating a hamburger. However, it doesn't. In fact, sugar suppresses satiation so, if you drink a soda you will likely want more hamburgers than if you didn't....meaning each calorie in soda is really more than 1 calorie since it will induce you to ingest more calories of something else than you would have normally.
Without knowing how different foods effect fullness, calories in and calories out is almost worthless since it doesn't tell you how to control it.
If the water pipe bursts a useful thing to say is "the shut off valve is over there", not "I think the problem is water is coming in" that is actully , correct but useless.