Sure, that could be a factor. Didn’t really seem to stop soldiers from steamrolling through American cities during the civil war, doesn’t seem to stop cops from messing people up during protests, and doesn’t stop genocide in other countries. We, as a species, are pathetically easy to manipulate through in-group, out-group thinking, which honestly is much of the basis for patriotism anyway.