Perhaps due to overconfidence (to the point of arrogance) that they'd win, as with Brexit, some on the 'losing side' have to tell themselves, or anyone that will listen, that people who voted differently did so because they're stupid, misled or otherwise didn't know what they were doing.
People who voted Trump and people who voted Brexit knew exactly what they were doing and had their own real and personal reasons for doing so.