the military may have made me depressed and full of anxiety

So I know some are in the military in this group and so am I. I have a question though, did anyone develop depression or anxiety after joining? I don't mean from combat or training related occurrences I mean it could be from how you were treated or your chain of command other people around you, your job etc. Has anyone else developed anything like this?