There was a general rage against the established order of things. Hillary represented that, and Trump was the anti-politician. Therefore, even for all his flaws, people gave him a chance. Not me, mind you, but over 47% of the populace. Furthermore, in the past 8 years we have seen big banks being bailed out while the economic system has generally profited no one but the upper 1%. In addition, for many there is the perception that the character of the nation is changing due to uncontrolled immigration. Trade deals are sending jobs overseas and not benefitting Americans. And finally, Hillary called 1/2 of Trump's supporters "deplorable", and her constant e-mail issues undermined trust in her. I still voted for her because I saw her as better than Trump, but about the same number of people saw it the opposite way. Hillary, I think, may still win the popular vote, but the Electoral College didn't end up in her favor. So, there are a lot of folks who just wanted to drain the swamp of Washington, and she was part of the swamp.
I voted for her, but I understand why many don't like her.