It is the nature of science that we change our mind as we learn new things.
But sugar was never OK. That was pseudo-science.
A lot of dietary "information" is pseudo-science. It's not an area we've dedicated a lot of effort into because we came up with a food pyramid one time and that was that.
We're still learning how wrong we are, as is the case in most fields