That's because soldiers are inherently immoral. If they sign up for killing people, what stretch is there to bullying, discrimination and intolerance?
Religion is an attempt to answer the philosophical questions of the unphilosophical man.