If you are a district attorney in a city, you depend on the help and cooperation of the police in your daily work. If you became unpopular with the police they can make your work very difficult and you could also become politically very unpopular. I think district attorneys and police want to do what they think is right but its very understandable to me why a DA does not want to prosecute police.
This is evidenced in Oakland, where the recall campaign for Pamela Price began before she took office.