Because specialized knowledge is often counter-intuitive, professionals in a discipline overestimate their understanding. This is why economists can only give opinions on very narrow specializations within their craft.
Because of the inescapable effect of anchoring, specialists rapidly decline in predictive ability over random surveys of the general population on matters of public behavior.
The general public is a constant victim of overestimating their understanding, and display pervasive dunning-kruger effects. Meanwhile specialists underestimate their understanding for the same reason.
While each individual in the general public is demonstrably an idiot about almost everything, enough of the general public grasps his state of affairs well enough to bias the survey of the public opinion toward a more accurate prediction than that of specialists.
In other words, a lot of people tend to be more right than a few people when it comes to general things, and specialists tend to be right about very specific things, and everyone in between is pretty much useless.