None of that excuses the police forces poor choices in response. And those poor choices don't excuse the rioting, looting, and burning of businesses. Nor would the shooting turning out to be justifiable excuse the obvious distrust and faults of the police in the past.
A pattern of poor policing and disconnect between the force and the community leads to many poor outcomes. The people end up not trusting the police even when the police are in the right. They end up with the 'snitches get stitches' attitude. This attitude is very obviously enforced by some in the community, as shown by the burning of the market with graffti and the fear the liquor store owner had in calling the police. It's an understandable reaction to a feeling of having no agency in the protection of community, a parallel pseudo-structure evolves. Even if that is outright corrupt as well, and it inevitably is (mafia), the people feel at least they have input in it. Obviously to the credit of this community many are not supportive of riots, looting, burning, and attacks. They're not happy with the police, but they don't take that objection into support of lawlessness and violence. This is something I have seen and understand but object to strongly. Many observers have been condoning, excusing, or even cheering the destruction and violence as sticking it to the police. It's not the police's gas station, and even attacks against the police themselves aren't justified. All that does is help the police justify their heavy-handed tactics. Way to prove them right.
It's a mess of interrelated issues, and it's inevitable that people will confuse which causes and affects which and in what ways. The oversimplification of these issues does a disservice to all of them. It's not simply 'police bad/good' or 'community bad/good'. Some of these actions are bad, and some of these individuals have problems, and some of these organizations are maladaptive, but that isn't reason for broad brushes.