This is it. There will always going to be impossibly unpredictable errors even if you measure everything perfectly.
The point of measuring is to be * as accurate as possible *, not 100% error-free. It helps to better estimate portion sizes, calorie / macro amounts. This is enough precision to control weight gain / loss correctly.
A lot of people also get their maintenance calories estimation wrong, so it doesn't matter if you can measure your food down to the molecules but still eat too much / too little.
A lot of people mess up more by doing a maintenance calorie estimation wrong and relying on it rather than counting calories coupled with weighing themselves and adjusting calorie intake up/down depending on whether they lose/add weight... If you use a feedback loop, then indeed it doesn't matter if your calorie estimate is anywhere near correct anyway, as long as you're reasonably consistent and the errors aren't too badly skewed toward the wrong foods.