Too many people do not like Hillary, and they stayed home instead of voting for her. That's the bottom line. Right or wrong, fair or unfair, she is not well liked enough to get elected.
The thing is, that was never a secret. It was obvious even before she got her ass kicked in the 2008 primaries. It was even more obvious afterwards.
So why did she run last year? For her own selfish reasons, that's why. She should have known she would lose. If she actually cared about things as much as she claims to, she would have stepped aside and let someone else, run instead. Then we wouldn't be where we are today. But because she couldn't put aside her own wants and do what was best for the nation, here we are.
(Even her campaign slogan spelled it out: "I'm with her". Clearly, it was all about her, and not about the country.)