The prediction model used by Nate Silver at fivethirtyeight.com gave Trump the highest chance of winning the election. Other pundits and pollsters criticized him for it, but in the end his model turned out to be the most correct. He notes that this election would have been completely different had the result been only two percentage points in the other direction:
What would have happened if just 1 out of every 100 voters shifted from Trump to Clinton? That would have produced a net shift of 2 percentage points in Clinton’s direction. And instead of the map you see above, we’d have wound up with this result in the Electoral College instead[…]
Michigan, Wisconsin, Pennsylvania and Florida flip back to Clinton, giving her a total of 307 electoral votes. And she’d have won the popular vote by 3 to 4 percentage points, right where the final national polls had the race and in line with Obama’s margin of victory in 2012. If this had happened, the interpretation of the outcome would have been very different[...]The cold, hard truth is this: Hillary Clinton failed to swing those two percentage points her way - she failed to win the presidency - because she was a poor candidate. She was uninspiring, secretive, severely compromised, and the epitome of a political insider when it was clear that voters wanted something else. As I noted in regards to John Kerry twelve years ago, it's just not enough to be the "not Trump" candidate; you have to make people want to vote "for" you as well. She just didn't possess that appeal.
Her campaign, furthermore, erred by taking her "firewall" states for granted, and as a result she lost Wisconsin, which last voted Republican in 1984, and Michigan and Pennsylvania, which last voted Republican in 1988, by slim margins. In that light, Clinton becomes the least successful Democratic nominee since Michael Dukakis. Yes, it looks like she will win the popular vote. But that's not how we elect presidents in the United States.
Anyway, it's over now. And as much as I want to hope for the best, I believe that Donald Trump is hopelessly unqualified, racist, greedy, authoritarian and mean-spirited, and that his presidency is going to have catastrophic and potentially irreparable consequences for this nation.
John Judis has what I believe is one of the better takes on why Clinton lost, why Trump won, and what the future might hold.
God bless America.