I've often found anthopology and primatology to be helpful when it comes to understanding human behavior. If you ever watch a troop of baboons or chimps becoming agitated, you see a kind of "group mind" take over and individual animals lose themselves in the frenzy. It's the same with humans. The French explicitly recognize this: their word for mad ("fou") forms the root of their word for crowd ("foule"). When people form a crowd it rapidly becomes a mob, at which point all conscious thought disappears. Hence indiscriminate violence directed against those one is nominally allied with.