They served a warrant for a drug charge. They knocked and said police, open up. Someone shot at them, they shot back. How is that poor judgement, other than the drug laws being silly?
It's literally impossible for police to do their job under these circumstances, so the only solution is to change the drug laws, not defund the police.