It usually takes an incident to get a riot started, such as the police attacking or killing an innocent person. But once it has begun, a raging mob has a life of its own. Deep-seated resentments, repetitive frustrations, and long-standing disappointments galvanize people into action. And the mob provides cover, an anonymity that makes it easier to overcome one's usual reticence or moral scruples. One is immersed, engulfed. And it can become an exuberant experience, a joyful release for long-suppressed emotions. It can also become manic, driven, a means of restlessly seeking new outlets. Leadership emerges spontaneously and changes rapidly.
[Rioting] offers a kind of intense belonging, not dissimilar to what spectators feel at a sports event or fans at a rock concert. But because it isn't focused on a game or performance, it easily gets out of hand. Freud described such "mass psychology" in 1924, in the tumultuous aftermath of World War I. Others have studied it since as a recurrent form of group behavior.
Ken Eisold Ph.D., "Understanding Why People Riot," Psychology Today, August 18, 2011