I think Trump got so many votes because of Republican loyalty, anti-elite and anti-establishment resentment, a desire by people doing well not to lose their relative advantage (even if the economy as a whole does worse), racism, and sexism. The high turnout suggests that Trump's personal qualities actually increased his support, which is disheartening. [Update: It looks as though I might be wrong about this. According to @MaxBoot: "Obama got 65.9m votes in '12, Romney 60.9m. Clinton has 59.3m, Trump 59.1m. R vote didn't go up; Dem vote went down. 6.6m missing votes."] But if you want an anti-establishment figure then one with a vicious character might be appealing. And he clearly has the qualities to appeal to racists and sexists. If what you care about most is your own relative wealth, etc. then you might well hold your nose and vote for a Trump. (Relative wealth because a Trump presidency is not actually likely to be good for the economy overall.) So maybe it's not so mysterious after all.
One remaining mystery is why there was so much antipathy towards Hillary Clinton. Sexism must be part of the answer, and her being part of the establishment another. But enough mud seems to have been thrown at her that some of it has stuck, leaving many people convinced that she must be corrupt despite the absence of proof. This raises questions about the media as well as about the electorate. If you don't like Clinton because she's supposedly corrupt, why would you prefer Trump? Of course I don't know. I wonder whether guilt about voting for Trump produces bad feelings that are then projected onto Clinton.
The media partly want to get attention, and Trump is good for that. They also might really believe that there are two sides to every story and no such thing as objective truth for them to report. The result is that both candidates are presented as being about equally bad, so you can hate the one whose policies or associations you don't like while not feeling too bad about voting for the one you prefer. Meanwhile the public has also been brought up on some kind of relativism by journalists and possibly high school English teachers, and everyone seems to share Fox News' skepticism about objectivity in journalism. So inconvenient facts are brushed aside as part of someone else's narrative.
The real question is what we can do about all this. My hope had been that the Republicans would lose so badly that they changed into some sort of kinder, gentler, possibly somewhat libertarian party. In turn the Democrats might move more to the left, and the resulting compromise government would tend to be non-interventionist in foreign policy, egalitarian, and respectful of personal freedom. So much for that. The Republican Party might not change very much at all, but it certainly isn't likely to become kinder or gentler. The market has spoken, and it did not ask for generosity, chivalry, or even decency.
I see two non-dreadful paths ahead. One is that demographic changes mean we don't have results like this much more, if at all, in the future. If the Democratic candidate had been a man then Trump might not have won (although if they only ever put up male candidates that would be dreadful). If the non-white population grows faster than suppression of the non-white vote then there is hope for a non-Republican President in future. Eventually, perhaps, all those angry old white men will die and fantasies of some sort of return to the 1950s will die with them.
Alternatively, perhaps the Democrats can make themselves more appealing to some Trump voters, most obviously members of the working class. According to the Measure of America: "Whites saw the greatest earnings drop between 2000 and 2010, nearly $2,300." I wouldn't recommend targeting whites per se, but people whose earnings have dropped are going to be unhappy and will want both hope and respect. The Democratic Party needs to make it clear that it is concerned about these people and has something to offer them if it is going to get their votes. It's a tall order when jobs are disappearing, but there are things we could do. And Trump has managed to get these votes without having a viable economic plan, so it might be easier than it seems.
None of this might matter if no one believes anything they read, see or hear that doesn't match their prejudices and fantasies. But there is still some room for hope. I think.
Failing that, there's Betjeman:
And all the time the waves, the waves, the waves
Chase, intersect and flatten on the sand
As they have done for centuries, as they will
For centuries to come, when not a soul
Is left to picnic on the blazing rocks,
When England is not England, when mankind
Has blown himself to pieces. Still the sea,
Consolingly disastrous, will return
While the strange starfish, hugely magnified,
Waits in the jewelled basin of a pool.