It ensures that you are able to say whatever you want without fear of legal retribution. Expressing views in line with Stormfront or the KKK is undoubtedly offensive and I find it distasteful, but rather than attempt to bring legal action down on those groups, I will simply refuse to associate with them. Allowing the majority to silence a minority makes sense, if you want to continue to repress that minority. Does that sound familiar? In conclusion, banning speech that some consider "offensive" is a short way to restricting any dissent.
Though, I understand what you are saying. Freedom of expression is a huge part of our society. We have the right to stand firm to what we believe in, however, to a certain extent. We look at certain protests today and it is ridiculous that burning down businesses, attacking others and setting cars aflame is even still happening. What happen to Martin Luther King's way of protesting? It worked then, it could work today.
On the question... The government has the right to stop any protesting or freedom of speech that interferes with someone's safety or well-being. In fact, since the government has stopped recent protests that involved setting businesses on fire, everything has died down a bit. However, if the protesters would have kept doing what they were doing, it would have gotten more people riled up and would have prolonged the un-peaceful protest. With the government stopping them, it helped our society, the well-being of our citizens and the local economy in that area.