The Republicans start off from the thinking that Democrats winning the presidency is illegitimate.
When Bill Clinton won, they considered him illegitimate. ("If Ross Perot hadn't run, Bush would've won," they say, forgetting that the entire point of Perot emerging is because many voters hated Bush. And exit polls show that if Perot hadn't run, Perot voters would've been split evenly between Bush and Clinton, meaning that Clinton would've won anyway.)
Republicans were so convinced of rampant Democratic voter fraud, that when Bush took office, his Justice Dept spent 5 years investigating Dem voter fraud -- only to come up short.

We all saw what happened with Obama, whom the Republicans also considered an "illegitmate" president.
A lot of Republicans would point out that Obama didn't win the white vote, so he wasn't truly the president.
But newsflash: Lyndon Johnson was the last Democrat to win the white vote, and that was coming a year after Kennedy's assassination. Since then, Democrats have always lost the white vote.
White people prefer republicans and republicans prefer white people.
If only white people voted, we'd have a totally different America.

Who was the No. 1 voice in the "Barack Obama is illegitimate" movement?
Well, that would be Donald Trump.
Trump is of the mindset that just about every bad thing that happens to him is a conspiracy against him.
Nothing legitimately bad can happen to Trump!

And the thing about Trump is he doesn't back down. Backing down is for losers.
In Trump, the Republicans have found the perfect avatar.
They, too, learn that not backing down is better than conceding. It's better at riling up the base.
It's better to live in a world where everything is rigged against you.
So that's why so many Republican voters think the election was rigged: Years of Republicans declaring Democrat presidents being illegitimate + the guy who lives in a world where losing doesn't legitimately happen. (Hell, he was calling the 2016 election rigged!)