Larry Elder got too comfortable and made many gaffes along the way
Or voters just got to become familiar with him. It's pretty hard to run a campaign against California becoming expensively unlivable under Democrats when your leading replacement candidate is loud and proud about abolishing the minimum wage. The Republicans failed to put two-and-two together on that, assuming that base turnout alone and Democratic complacency could causer an upset here. They will be proven wrong about that next week, and will deserve it.
Trump's win has convinced a lot of Republicans that any old troll can win any election if he panders to the base. It was always going to be an uphill, near impossible battle to get a Republican elected governor of California in 2021, but the one surefire way to turn those odds into practically 0% was to nationalize the race and run an insane conservative media pundit. Someone made comparisons to Kentucky 2019 or Alabama 2017, and it'd be like if the Democrats ran an MSNBC commentator and championed endorsements from people like Pelosi or AOC.