I think there are several reasons the election turned out as it did, but that -- for the most part -- it would be more accurate to say Clinton lost the election than to say Trump won it.
This is definitely true. Clinton lost rather than Trump won. The post election numbers were not ambiguous at all.
The turnout was bad, even by the low standards of USA presidential elections. Trump's turnout was way off Romney and McCain's performance. But it was the Democratic voters who stayed home in droves, or voted third party. Those people effectively voted for whoever won. There's lots of reasons for that.
I think Sanders did a lot more damage with his "Wasserman-Schultz is stealing the election from me!" crap than the DNC realized. He got a bunch of low information liberals all riled up who then were too ideologically pure to support the real Democratic candidate. The fact that Clinton was so very far ahead in all the polls made it easy to defect from the Party. Also, she was doing especially well in some states that in the past reliably produced small margins in favor of the Republicans, like North Carolina. So the campaign put more effort into such states than usual, instead of solidifying support in reliably Democratic states like Wisconsin, Michigan and Pennsylvania. Again, because with her so far in the lead, taking a chance on an even yuuuger victory looked like a good strategy for the Democrats.
If there is anything one thing that Putin could have done to influence the election, it was to keep pushing the pollsters giving Clinton a 95+% odds of getting the presidency. That seriously impacted the turnout, especially among the fringier Democratic voters. Who are notoriously low turnout voters to start with.
So I strongly believe that Clinton lost, instead of Trump winning.
Tom