Working with people in personal training and nutrition, this is a question that comes up a lot. Usually with an emphasis and slight drag on the "have to."
Here's the thing--you don't have to do anything however, some things will yield better results (if that's the kinda thing you're looking for).
If you're looking for weight loss, counting calories + food journaling is one of the most effective ways to start seeing the things you're looking for.
When it comes to weight loss, calories in make a BIG difference. If you are eating more than you are burning, you will not lose weight. This doesn't matter if you eat McDonalds all day or broccoli: more calories = fat gain. While we don't suggest filling your day with unhealthy options, the point is that too much food = no fat loss.
With all of the diets out there lately toting magical change, such as Whole30, Keto, Intermittent Fasting, etc., the only thing that leads to superior results is less food.
Food journaling and counting calories can be important, especially in the beginning of a health journey as it gives you a true idea of what you eat. Many times we think are are eating one amount but tracking in an app like MyFitnessPal shows that we are way off in our calorie estimates.
Now, does it truly matter if you're eating 30 extra calories of peanut butter per day? The answer is an absolute resounding YES. Think about it as a weekly amount: 30x7 = 210. That 210 extra calories can change whatever deficit you're in and make it way harder to lose the weight you're trying to get rid of. Do the bites you eat while making dinner or the ones you steal from the baby add up? Sure do.
Not only does tracking your food intake ensure you are eating the right amount, but it helps you stay accountable to yourself. Do you need that piece of candy, the after dinner snack or the cookie in the break room? Likely not. Viewing each and every bite/food choice as significant can help to break a cycle of "treating yourself" or viewing things as "too small to notice."
Another benefit to food tracking is allowing for some flexibility in your diet. Rigidity can be the thing that makes us take a step back and neglect what we know about nutrition. With food tracking (in whatever modality you're using), you can be a tad more flexible in your food choices while still meeting your goals. This means you don't have to eat the same things everyday unless you want to. It means you can still go out and socialize without sipping on water the whole time. Food tracking allows you to enjoy your life without sacrificing everything to "diet."
Now, food tracking can have slight inaccuracies but, the pros outweigh the cons based on labeling of foods, absorption, sizes, etc., calories/macronutrients can be slightly different all of the time. You might only absorb 50 calories of an apple while your friend absorbs 80. Despite this, the more conscious effort on learning about nutrition, macronutrient breakdown and watching your food by tracking is a great way to not only work on better habits but reach the goal you're looking to achieve.
So, do you have to count calories to lose weight? You don't have to do anything. However, we find that it yields the most significant results when it comes to reaching any kind of weight goal.