I think one source of anti-science behaviour might be betrayed expectations. I know that I personally have stronger expectations for academia and scientists than for other people. So when someone from academia, a scientist, an engineer betrays these expectations, I feel worse than if a regular person did it. There's a feeling of "If we can't even count on those people, what are we even supposed to do?". For example, at the beginning of the COVID pandemic (around January 2020), I read a lot about it. Lots of very smart people were saying that this could be a big pandemic. I talked about it with a doctor in a non-professional setting that told me to basically not worry about it, that it wasn't going to be anything huge. This time I was right and he was wrong. Was it because I searched more about it? Was it just luck? I don't know. But I know that it made me lose a bit of trust with that person.
I think the origin of this might be on how I (or we) see those people. You're supposed to follow what the doctor tells you, what the scientists tell you. But in a way, since you're supposed to follow what they say, they have some kind of responsibility towards you. And when they say something wrong, it's way worse than when a regular person says something wrong. It's like when you're young and your teacher or your parents are wrong, it's very frustrating.
Your example about the sugar industry is also a great one. Try to understand a bit more about nutrition, and soon you'll hear all kind of conflicting advice and explanations from very different experts.
I know that personally I have to work on myself and accept that those people are humans, and make mistakes, just like me. But just like telling people to eat less and move more didn't solve the obesity epidemic, I'm not sure that this solution will scale to a large population.