Firs, he had a loyal corps of ignorant White Trash who adored him. They loved to see him slap down the smart kids who had so humiliated them for so long.
Second, the DNC tried to lose by tilting the scales for the most despised woman in America. And DNC insiders still have the attitude that they know best and must keep the hoi polloi from making decisions. Their current revival of Cold War propaganda with "the Russians did it" is both laughable and disgusting.