If you think Manning's sole motivation was heroic, you're wrong. Revenge was one of his big motivations as well. Which is why he didn't just release information on wrongdoing, but grabbed everything he could steal, because he was in a ****ed up place and hated the army. He released tons of shit he never even looked at.
He was in a ****ed up place for a lot of reasons, but probably the biggest was he feels he was born a woman (I can't imagine what living with that in the army must be like) and just broken up with his first boyfriend. Even he was discovered as the leaker, he was going to be discharged from the army because he punched a female soldier in the face. Even before he joined the Army he pulled a knife on his stepmother.
So he had a lot of issues going on and in addition, he realized he hated being in the Army and felt the War he was part of was unjustified.
If you think Manning was a cut and dried hero, you're wrong. You're denying him his complications, his flaws and his essential humanity if you prefer the cardboard version of him. His courtroom statement to me reads like someone who has spent some time thinking about what he did and why and honestly regrets the choices he made. If you want to read more about Manning, I recommend this.
Yes, Manning exposed wrongdoing. He also committed a bunch too. I feel sorry for the kid.