Honestly, yes the defeat in retrospect was to be expected (to everyone but the pollsters maybe?) but Harris was no lightweight and it was reasonable to expect she could compete with a damaged (hey, the U.S. now has a felon president!) opponent who she defeated at the first & only debate. Had the election been held in August she'd probably have won, but give those trans-phobic tv ads time to sink in and male latinos would rather vote for the felon-man who had the presidential experience, and find a way to make his eggs a bit cheaper, along with the rest of inflation. Supposedly.
Harris was up against a lot of negativity and she wasn't well defined enough to find defense against it all. Trump, on the other hand, actively provided a defense against all the cases against him -- since fighting is all he has really. Even if he was losing and the defenses flawed -- even convicts in prison find women to wed them. Those prison brides share much of what we see in (some of the less practical) Trump voters.