If you go back 2 or 3 year there are puff pieces about Biden polling really well against Trump and "He would've beat him in the election!". That was probably when the DNC power brokers decided they were Ridin with Biden this time.
The primary was pseudo open, a lot of it was scripted for the desired outcome like the coordinated dropouts, Warren staying in the race and having the "My daddy was a spook, I make 120k p.a. but I blather about commodity fetishism so look how leftist I am" caste constantly boost her to siphon votes from Bernie and of screwing over Tulsi in any way they could.
His mental decline has really put them in a bind because they wanted a somewhat lucid Joe in, even as a single term president, to roll back as much of the stuff Trump did as possible.