No they refused to prosecute because they had no evidence that he willfully retained classified documents. The willful part is what makes it a crime, accidentally taking some paperwork you shouldn't have happens.
Biden: I discovered I had these classified documents, handed them over, immediately searched for more, and invited the FBI to do the same. Exactly what you're supposed to do when you discover yourself in unauthorized possession of classified documents.
Trump: No I don't have any classified documents, and had my lawyer testify to that fact under oath. Oh, that unsecured room full of them? No, those are mine. You can't have them. And anyway I declassified them in my imagination without doing any of the paperwork required, so they're fine. You're confiscating them? That's theft! And yes you got them all. Oh, these? These are mine, and you can't have them.
One of those acts is not like the other.