Gang mentality isn't about a shared opinion or thought. The gang thing happens and is easily identifiable when normally placid people or those who keep their bad thoughts to themselves (or at least off the board) suddenly gain courage because someone else is attacking someone and airing their thoughts.
They then open up and join in on the attack with the idea of numbers being greater than a sole defender (either in their subconcious or they are well aware of this). They cease to see that there is an imbalance of numbers. Like a street fight where it becomes a group against one isntead of one on one.
Most civilised humans see that this is not fair or right. I the heat of the moment though, we can all sometimes become carried away and this is then becomes a pack attack, just the same as dogs will do.