It could've been easily prevented by actually arresting someone that committed abject murder, but the city and the police chose to instead defend a man who has killed multiple people in the past and got away with it scott-free. So when people feel like justice no longer exists, there should be no surprise that they get angry.
It doesn't help that the police also employ agent provocateurs whom help incite riots and looting so that they can use more violent tactics with glee.
I think this is the key here. The whole BLM movement has been going on for years and, for the most part, it seems like a lot of people are more aware. It doesn't seem like anybody from the top cares to do anything about it though.