They really haven't. Nutrition science has been a process of refinement as we've learned more over time. E.g.:
"Fat is bad"
"Saturated fat is bad, non is good"
"Saturated fat is bad, monounsaturated is good, polyunsaturated is bad. Oh, and trans fat is really bad."
"Well, among the polys, omega 3s are good, others are bad"
Many refinements later: "Concerning this specific fat molecule, the health impacts are X, except there's evidence that people with Y genetics have Z impact..."
The earlier statements weren't wrong, they were just overly broad.
This is part of why I had the new "ultraprocessed" label. We've been working so hard to separate out what specific things are causing what impacts, and then they just leap backwards and lump everything back together again : Homemade doughnuts deep-fried in coconut oil and lard: "not ultraprocessed". Store whole-grain bread: "ultraprocessed". Such a moronic grouping. Yes, the average of the ultraprocessed category is worse than the average of the non-ultraprocessed category, but that says nothing about individual foods. It's also a back door for anti-tech/anti-science woo to sneak into food science.