One of the issues that comes with a question like this is the misperception that defending a client accused of a criminal charge is an all or nothing prospect: guilty or innocent. Many clients accused of grievous criminal charges are indeed innocent, and deserve every chance to prove such. Many others are indeed guilty as charged. If a truly guilty client has no valid legal defenses--self-defense, heat of passion (mitigates murder to manslaughter), illegal collection of evidence, ect.--then there's not much we can or would do to get the charge dismissed. No attorney can makes invalid claims in court. But even where conviction is certain, there is the necessity to make the final sentence match the crime. Even when speaking of the worst crime, murder, there are gradations of how severe the crime was, and conversely how severe the sentence should be. So that's basically it, make sure the truly innocent are protected, protect everyone's rights by holding police or prosecution malfeasance accountable, and make sure the punishment matches the crime. The public defenders don't want dangerous criminals on the streets any more than prosecutors do, but even true criminals have rights that need to be protected.