Trump won because Hillary pretended the election is being held in 1996 and her job is to make the DLC great again.
Clinton had no defense against attacks about her positions on substantive issues such as trade, the economy, manufacturing, and foreign policy. The only points she scored were on schoolmarm gotcha’s about his past personal statements or his business activities. For his part, Trump was thrown off course when the topic moved to his taxes, but he evened things up with her emails. When the debate revolves around scandals, Hillary can never do better than fight Trump to a draw.
The electorate will remember what Trump said because the subjects of his attacks all centered on leading issues. Hillary on the other hand pretended the past 8 years of her career never happened and the condition of the country is excellent.
The delivery of Trump’s attacks were given in a clearer way than they were against his primary opponents, though he did not go on the attack as often as he should have. If he had turned the subject back to her failings more frequently he would have won by a greater margin.
In terms of temperament, Trump had the advantage. He didn’t come across as insane, but he managed to sound real and passionate while Clinton was slippery, over-scripted, and her script was limited to Dick Morris-style triangulations about micro-policies. A Dick Morris approach is the wrong one when the world is convulsed by macro-disasters.
The pundits will probably wrongly count the debate as a Clinton win on grounds of tone. They will be wrong because a darker tone better reflects the dark mood of the electorate.