Hillary's rep has been dragged through the mud for 20+ years. She's viewed as a cold, calculated c*nt by a huge swath of this country. Biden's record might be worse, but he's generally viewed as being a good-natured amicable person. He's much more relatable than HRC. He's got the built-in advantage of being a white male and strong ties to an important state - Pennsylvania. The voter base is also on full alert right now, nobody's taking Trump lightly like in '16.
Bill Clinton should have been more involved with her campaign. Apparently from what I've read she deferred to Robby Mook over her husband on several issues and it backfired. Biden is seen as a true ally of Obama. HRC is a former opponent turned subordinate.
I've always said the primary would be more difficult for Biden than the general. But you have to admit him sustaining this lead after a poor debate performance and racial scandal is pretty formidable. Like I said above I think every time Trump throws an insane tantrum it helps Biden draw in voters who disgusted with Trump and just want to see him defeated.