Also never been a fan of Biden (but voted for him, and will again, if I have to). You're falling into a Sunk Cost Fallacy. Yes, anyone chosen to replace Biden would be a gamble. But, Biden is a losing horse. The right time to replace him was last year. But, just because we missed that opportunity doesn't mean we should throw good time after bad. He should be replaced before things get so late it literally cannot be done.
This wasn't some otherwise strong candidate, who just had a bad day. Biden is already struggling in polling. While the economy hasn't been fantastic, it's good enough that he should be crushing Trump. Even in 2016, Clinton was polling ahead of Trump and still managed to snatch defeat from the jaws of victory. Biden isn't winning. He's maybe tied and maybe losing in current polling. Trump had already proven that he can be convicted in court and not lose support. There's just not much left to hurt Trump. And Biden doesn't seem to have anything left to gain support. Things are not going to get better for Biden.
Biden is losing this race. It's time to follow the rats off the ship, before we're trying to escape a ship on the bottom of the ocean.
Personally, I'd look very closely at any records this returns and verify that they are normal. A previous developer could have left some sort of backdoor or other nasty surprise in the code/database such could only be tripped with a very specific condition.
Alternatively, consider the context around this code. What is done with those records? Maybe there is a very specific bug elsewhere in the code or in a front end tied to this database. Sure, the right solution was to fix that other bug. But, that may not have been an option. So, this strange bit of code "solved" the problem and was then promptly forgotten.