Easy. The right wing billionaire Robert Mercer and his daughter were insightful enough to do all the ground work, to propel Trump past the winning post.
"Meet The Man Behind Cambridge Analytica, Who Made Trump President
This is the story of Robert Mercer. A far-right billionaire, who is a major investor in Cambridge Analytica that data scrubbed Facebook for Trump, brought Bannon to the White House, and made his daughter the major owner of Breitbart News and board member of Cambridge Analytica"
https://www.commondreams.org/views/2018/09/22/americas-political-pollsters-could-be-missing-x-factor-2018-elections-hidden-voters Particularly telling was the assumption department, where many pollsters tweaking raw results gave too much weight to college graduates widely supporting Clinton—thus underestimating Trump’s support. And then some slice of Trump’s base fell into that hidden category, because they were infrequent voters.
· 10 months ago