Not every case involving mishandled classified documents gets prosecuted. The key factor in the Trump case seems to be his actions after the discovery.
I found this an interesting summary, given the whataboutism coming from the Right following Trump’s indictments.