The lone member of Obama's State Department who spoke out against that treatment-- P.J. Crowley-- had to resign the next day for doing so.
If you didn't know about any of those events I'd suggest reading up on them before commenting further on the subject.
She got off very easy for the deaths she (unintentionally) facilitated by deciding her conscience spoke more loudly than the expertise of thousands of State Department operatives trained to deal with delicate international political issues.
Assange did the opposite. He came out guns blazing. When you do that, the court system often will find a way to bone you. And that doesn’t usually result in repercussions because the system can say “well maybe we were a little wrong but he wasn’t helping his case!”. And tragically that’s often enough for the external watchers to let it go.