Yeh, that's science. As we learn more the guidance is refined. Generally speaking for decades the guidance has been to eat a well balanced diet—that hasn't changed.
There is also a second issue, government agencies have been co-opted by industry to make recommendations not supported by the science. I'm specifically thinking about recommendations around fat&sugar, the same thing you called out that indicates the problem is not the science but rather regulatory capture.
~10 years ago they still thought eating fat made you fat, and recommended high carb diets.
Perhaps the 2021 recommendations are finally the correct ones. But how do I know that?