This has been covered and mentioned way before me, but there are in fact tactics and techniques that can (and should) be used to attempt to de-escalate situations before they get to the point of active rioting.
Specifically, the Army (I believe), and I'm sure other branches of the armed forces, have training manuals on how to interact with people in ways to keep both parties (the would-be combatants/rioters AND other military personnel) from boiling over. This is the sort of this that is incredibly useful, a necessity even, when you're in an active war zone. There's a direct translation over to civilian life, though. At the end of the day, you're trying to keep the peace.
Does it always work? I don't know: I'm not military personnel, nor a LEO, and I haven't looked at all of the available data. As a person who isn't comfortable with the amount of force that local law enforcement in America shows to all people, innocent or guilty, I can tell you 100% that I would personally feel better if I never saw officers show up in armored vehicles.. ever. They're not trained for it, they shouldn't have it.