You can argue that they should have gone straight to the DA, and you might even be right, but the only way for this problem to get fixed is by cleaning house at the police department, not by scolding Apple for trying to work with corrupt officials.
Keep in mind that it's incredibly rare for any DA to go against the police, so this case is already unusual. We'll have to wait and see if they actually have the evidence / wherewithal to see this one through rather than just settling out of court for a slap on the wrist.
Edit:
I actually agree with the comments suggesting that Apple and similar companies will learn from this experience and will use it as an example when trying to ensure that it doesn't happen again, and in that sense, it's important that they be punished too.
I think the point I'm trying to make is that, on a moral level, the police department comes off looking way worse than Apple here, and their punishment should be higher.
Police are given a special position in society where we essentially trust them to conduct themselves professionally and uphold the law fairly. When that trust is misplaced, the checks are slow and unreliable, and corrupt cops can cause a whole lot of mayhem while we're waiting. So if you're going to go after police corruption, you'd better hit hard. It's really, really bad for society to have police who are so comfortable asking for bribes this openly.
It's also bad for companies like Apple to feel like they can just pay the bribes to grease the wheels, but it's a different kind of bad. It's a "We should punish Apple to discourage a tragedy of the commons" kind of bad, while police openly asking for bribes is a "betraying the public trust" kind of bad.