It is called deindividuation. It is a concept of social psychology and it shows the loss of self-awareness. Deindividuation theory tries to analyze antinormative collective behavior, such as violent crowds, lynch mobs etc. There is a model called SIDE (social identity model of deindividuation effects), which provides an alternative explanation for the deindividuation. The model suggests that anonymity has a profound effect on a group behavior.