On Killing by LtCol Dave Grossman, 2009, Excerpts
The primary factor that motivates a soldier to do the things that no sane man wants to do in combat [that is, killing and dying] is not the force of self-preservation but a powerful sense of accountability to his comrades on the battlefield. The bonds combat soldiers form with one another are stronger than the bonds most men have with their wives.
Four brave men who do not know each other will not dare to attack a lion. Four less brave, but knowing each other well, sure of their reliability and consequently of mutual aid, will attack resolutely. There is the science of the organization of armies in a nutshell.
Men in combat are not usually motivated to fight by ideology or hate or fear, but by group pressures and processes involving  regard for their comrades,  respect for their leaders,  concern for their own reputation with both, and  an urge to contribute to the success of the group.
The recent loss of friends and beloved leaders in combat can enable violence on the battlefield. The deaths of friends and comrades can stun, paralyze, and emotionally defeat soldiers. But in many circumstances soldiers react with anger, and then the loss of comrades can enable killing. Revenge killing during a burst of rage has been a recurring theme throughout history.