It’s a fair question, especially since Daniel Hale’s crime, for which he was convicted and served time, was less consequential than Biden’s. From Daniel Hale at aljazeera.com:
Just like me, Biden kept classified information outside a secure facility and shared that information with the press to express concern over US policy. But the prosecutors treated us very differently.

In February, I was released from federal prison, having served 33 months for a violation of the Espionage Act, after I disclosed classified information detailing what I saw as the high moral cost of America’s drone assassination program. Before having time to adjust to the world beyond concrete walls, I was struck by the news of Special Counsel Robert Hur’s report [PDF] wherein he lays out the reasons he decided not to charge President Joe Biden for alleged violations of the same law.
I am always encouraged to hear whenever the Justice Department decides against using the Espionage Act. By the time the ink of the 1917 law had dried, it was already being used to silence voices of dissent across the country. Thousands were rounded up and summarily convicted for their opposition to America’s involvement in the bloodiest conflict in human history at the time.
While some of the worst aspects of the law have since been amended, the Espionage Act remains the premier criminal statute for prosecuting government sources who rely upon the press to expose secret government abuses to the public. The decision by Justice Department officials to go after government whistleblowers with the Espionage Act has been a part of a concerted effort to signal clearly that the next person who dares speak with a reporter could find themselves facing decades of incarceration.