The people at fivethirtyeight analyzed factors which may have contributed to Hillary Clinton's defeat. They include: Russian intervention; the Comey letter; media obsession with emails; hostility toward cultural change: never-ending coverage of Trump; resentment inspired by Fox News; sexism/misogyny; Clinton fatigue; Bernie Sanders; Clinton's Midwest strategy.
There was one more. As described in a snarky,lengthy tweet by an anti-Clinton Washington Examiner reporter, "the problem started with history. It was exceedingly difficult for either party to hold onto the White House for more than eight years in a row."
Nate Silver, who on fivethirtyeight's 1 to 5 scale assessed this at 4.5, remarked
It’s not clear to me whether a party is actually at a disadvantage after holding the White House for two straight terms. But it’s certainly not at an advantage either, and Gore lost in 2000 under highly similar circumstances to Clinton.
The parallels go beyond Clinton and Gore both winning the national popular vote while losing in the electoral college, and both being decidely more qualified and clearly less charismatic than their opponents.
Coal: On November 5, 2000 The New York Times quoted a West Virginia logger, alienated by Al Gore's emphasis on environmentalism, remarking of a possible Democratic victory: "'There'd be a lot more new laws, All the guys who work up on the mountain think he'd be bad.'' Strip mining did not fit into Al Gores' prescription for climate change, and he narrowly lost both West Virginia and Ohio.
President Obama was responsible for (as the industry termed it) "a wave of environmental rgulations" which, according to Politico "conservatives contend is the reason 40,000 coal miners have lost their jobs" and which they absurdly termed "the war on coal." Candidate Clinton did not help herself in West Virginia and Kentucky (where she was shellacked), in Ohio, or in Pennsylvania (where she lost narrowly) when she backed this approach by seemingly accepting the loss of thousands of additional jobs.
Cuba: The Clinton Justice Department approved a raid, extremely unpopular with Cuban-Americans, in which on April 22, 2000 young refugee Elian Gonzalez was seized. Candidate Gore fumbled the issue, which could only have hurt him anyway, and he lost the election by narrowly losing Florida.
In both cases, the approach of the Democratic president was good policy but bad politics for his would-be successor.
Of course, Al Gore did not have to deal with a propaganda campaign directed by Russia to undermine a presidential election. By late September 2016, President Obama was aware of the Kremlin campaign to defeat Hillary Clinton. But the President wanted a buy-in from GOP congressional leaders- which he didn't get, Donald Trump was claiming the election was rigged, and the President who had spent 7+ years being intimidated by Republicans wasn't about to change course abruptly.
Nor did Al Gore have to explain away health plan premium increases averaging 25 percent announced the month before the election and an increasing number of health insurers dropping out of exchanges established by the Affordable Care Act, ridiculed as "Obamacare."
In July, 2013 a wise Megan McArdle estimated that, given the Democrats would be asking in 2016 for a third term, the 2016 GOP presidential nominee would have a 75% chance of being elected. In September 2016 an "ex-Obama aide" unironically slammed Mrs. Clinton's book as "the Hillary Show, 100 percent. A lot of us are scratching our heads and wondering what she’s trying to do. It’s certainly not helpful.”
They are loathe to point their finger at an individual who was elected twice to the White House. However, McArdle, Silver, and some others have a sense that the last eight years played a major role in the victory of a guy who irresponsibly and ridiculously- but brilliantly- called President Obama "a racist" who "has done a terrible job" and "will go down as perhaps the worst president in the history of the United States."