It may be a ploy, it may be 1984, but you also must consider the possibility that it may be true. Manning is clearly a very troubled man with a very sad and troubled past. He obviously made a very poor decision in enlisting in the first place when what he really needed was therapy to deal with his sad and violent childhood and his possible gender confusion. He obviously hoped that the military would beat it out of him. But instead he cracked completely. (The pressure of that job, with its 16 hour workdays, six days a week is such that even "normal" people do act out and snap.)
His superiors may just have felt that the picture of him dressed as a woman was simply "bucking for a Section 8" a la Klinger of MASH and so didn't feel it was a particular cry for help, any more than the incident with the knife. Or, he or she may have seen it as a Don't Ask, Don't Tell issue and so turned a blind eye.
But the reality was, however damaged Manning was, he was needed by his superior to guard the safety of the other young men who were in the field, outside the wire, the ones who could end up with limbs blown off, or coming back to their families in a coffin, or with not enough of them left to even need a coffin. Men whose lives depended on the men and woman who did the job than Manning had signed up for, trained for, and swore to do. It was a stupid war and the country did stupid things under the stupid president who sent us there. But it was his job and people's lives were in his hands. .
Whatever good you feel was done by his decision to randomly download and pass on information to some stranger on the internet, it is that betrayal of trust for which he has been sentenced. Hopefully, he will one day find peace within himself to heal his child-wounded psyche that led him to this place.