A lot of the explanation is that many working people liked Trump's dog-whistle white-nationalist message.  Things like "take our country back" and "make America great again."  They got Trump's message.