I'm going to assume you're being facetious and that you don't actually believe any of that.
As an example, the riots that were sparked by the Parliament's 1773 adoption of the Tax Act resulted in full-blown revolution and eventual American Independence.
(cue the flag, cue the music,
Mine eyes have seen the glory
of the coming of the Lord...)
Not only do good things come from rioting, but rioting is actually economically efficient. As with any cost of goods, punishing bad behavior increases the costs of engaging in such behavior and thereby reduces the amount of it. This is the underlying theory of most criminal justice schemes, and why the initial knee-jerk reaction to rioting, because many people think, as you said "rioting is criminal behavior." But such an "answer" doesn't actually work in punishing rioting. If it did, people wouldn't riot. So punishing rioting doesn't work, yet rioting punishes exactly what the rioting is in response to. Rioting that occurs in response to gross police misconduct and criminal system abuses imposes costs on doing those things. It signals to police authorities that they risk this sort of destructive mayhem if they continue on like this. Punishing rioting doesn't deter rioting, but rioting is a deterrent to the abuses. All else equal, this should reduce the amount of police misconduct as criminal justice authorities take precautions to prevent the next big riot. And if police misconduct and other injustices are reduced, it absolutely reduces rioting.
Riots are good for democracy. Riots are complex, uncoordinated crowd activities, and no one defends every criminal act committed by every rioter. Even in riots motivated by egalitarian and democratic aspirations, individuals often indulge in indefensible attacks on bystanders. We should and do reject the wrongdoings in riots, as we do in other contexts, but we cannot make the mistake of letting the wrongdoings divert and deflect or obscure the fact that outbreaks of determined public defiance can often shift the balance of power between ruling elites and the working-class and poor people that they exploit and oppress. People long dismissed by the powerful suddenly become impossible to ignore or dismiss, once their insistence on being heard finds expression in confrontations with the legal order and its police.
In the aftermath of riots, authorities often set up "commissions" designed to defuse the tension and redress problems. Initiatives are announced, programs are launched. Usually, of course, these do little to advance the public interest, and we rightly view these stratagems with a cynical eye as they come off mostly as lip service. Yet, regardless of their effectiveness, they tell us something important: grievances long ignored now have to be taken into account; that a strategy is now needed to undermine the new boldness of those no longer content to suffer in silence.
It is the very boldness of rioting that serves democracy. The defiance of the riot puts the powerful on the defensive and creates an opening for other, more constructive forms of organizing to take root. To turn the tide against injustice, we need movements that are relentless, escalating and with a broadening base of participation. Riots are no substitute for this effort. But, to the extent that they enable the silenced, ignored and oppressed to find their voice, rioting is an important part of democratic politics. It's a healthy dose of plant food for the Tree of Liberty.