Not having followed it, why do you say she ran an awful campaign?
There are many opinions on this. Unlike engineering, this is something that may not have a distinct right or wrong answer, and it's not my area of expertise. Those disclaimers in place, here's my take.
Too much rainbow, not enough mainstream. The Clinton campaign wrongly believed that they could assemble a coalition of demographically dissimilar liberals that could outvote a homogeneous conservative base. They failed. It's a bit tone-deaf for me to say so under prevailing circumstances, but you simply
cannot win a national election in the United States without broad appeal to white, working-class males who don't have college degrees. The campaign's decision to court one group over the other produced an image of Hillary Clinton as a coastal elitist. That doesn't play in Peoria. Promising to stand up for minority rights, and even having a history of doing it, are always things America likes to see and hear. Especially this month, where the long-standing problems are once again boiling over. But it simply doesn't produce voters in sufficient numbers by itself. It's amazingly difficult to craft a credible message of equality and the breaking down of barriers that resounds well enough with both the BLM types and the Peoria types to result in an American majority. I'm not sure I could do it. The problem with the Clinton campaign is that they didn't even try.
Too much faith in Obama momentum. Both Barack Obama and Hillary Clinton identified as big-city folk. President Obama's apparent economic success came largely in the sectors that voted for him -- big cities. The view from Peoria was that while the economy improved by some metrics, it was due to stimulus and bailout payments given to large banks and corporations at the expense of the working folk. They perceived comparatively little relief themselves. Middle America was still hopeful that the Obama promises would pay off when they voted to re-elect him. But by the time Clinton got around to promising a continuation of the supposed prosperity, it was already clear to most people that the trickle-down was going to be limited or non-existent Clinton had no real economic strategy of her own. Everything she had came from the Obama administration. After a while, the rhetoric ran thin and she just stopped promising any economic growth or improvement. Against Donald Trump's (failed) promises of middle-class economic revival, she had no chance.
Too much science and not enough campaigning. The 2016 Clinton campaign relied on very sophisticated data-mining and analytics models. Now -- with expertise -- I can tell you that this is a giant growth sector and it
will revolutionize the way we make decisions. The problem was that the Clinton campaign's model was wrong. Just because you are taking a scientific approach to focusing efforts doesn't mean your science is valid. The analytics model badly mispredicted the outcomes of the GOP primary in several states. Rather than accept that their approach didn't work, and return to proven-but-intuitive campaign strategies, they assured themselves that they would be able to refine the analytics to assure victory. This did not happen. Again the model failed to accurately predict the outcomes of the battleground states that fell to Donald Trump. It was telling them one thing, and seasoned campaigners were telling them aother thing, and the seasoned campaigners turned out to be right. Had Hillary Clinton simply campaigned the way her husband had, I believe she'd have had a better chance of winning.
Not enough distinction from Donald Trump. Hillary Clinton was perceived by many to be just as tightly entangled with Wall Street interests as Donald Trump, and therefore not any more likely than he to represent the "little folks" over big business. The Midwest and the South, which weigh more heavily according to the algebra of the Electoral College, will then vote according to morality. They will pick the socially conservative candidate over the social liberal if they see no other difference. But at the time, corporate campaign donations were seen as essential to funding the campaign, as opposed to a grass-roots funding model we've seen arise in backlash. Hence Clinton didn't risk alienating big business by promising to reign in corporations. Conversely, they botched the Steele dossier. By all means the Democrats should have raked as much muck on Donald Trump as they could -- because there's a lot of it. But the Democrats are still trying to paint themselves as the last bastion of civility, so they really don't know how to do the kind of serious opposition research that would have more credibly distinguished Clinton from Trump.