That's slightly revisionist. He won the popular vote by almost 5 percentage points. That's a lot. He also got more electoral college votes than GWB (both times) and Trump in 2016. His victories in the battleground states were also by a higher margin than Trump's in 2016, though still close. "Barely won" is a shade of true.
I honestly don't blame the guy for believing it was his responsibility to the country to run for re-election and keep Trump out of office. His heart was in the right place, even if the rest of him wasn't up to the task anymore.