There’s definitely a difference between leaking secret information to the public, and keeping it yourself to use for your own purposes. Without getting into which one is worse, surely you can see they’re not really comparable.
If Donald Trump had declassified the docs and shared them publicly, we would be having a totally different conversation, and he wouldn’t be under federal indictment.