It is the job of the military to kill or be killed and this profession is glorified in our culture despite the fact that we all recognize murder as being a horrible thing.
Because when someone kills within the context of war it is not illegal and thus not "murder", its a subtle but important difference and solves your conundrum. I agree, the best thing to do for the troops would be to end our various conflicts. Old fashioned war is becoming a little anachronistic at this point, future wars will be fought online.