Lots of rightist insiders were thinking that they liked tax cuts for the rich, partisan Republican judges, aggressive foreign policy, and cuts to healthcare and other aspects of the safety net, but they didn't want to have to back an incompetent and corrupt buffoon who had already been trounced by the incumbent president. RDS was a popular governor in a purple-ish state with a good educational background, and he seemed like a good candidate. So he had a lot of encouragement in the Republican media sphere, a lot of donors willing to back him, and some highly regarded young rightist thinkers who wanted to work for him. Very natural decision for him to give it a shot, though the problem is that he's kind of crazy (really believes in crazy rightist stuff), kind of funny-looking and short, and not really able to deal with non-fawning media.
I was always bearish on his chances, but I think he would have done better if he'd had the guts to go after Trump early on. I don't see how you win a campaign without being willing to criticize your opponent. And knocking Trump from the right was also really dumb. Even Republican voters don't really like Republican policies--the key for Republicans is to run on culture-war stuff, though not to the point of actually doing something (like, "we need to stop 'woke capital'" is a good speech line, but actually passing laws to punish people from wrongthink is less popular, and decrying abortion is good, but passing laws against it is a political loser). Just a really shitty campaign all around.