Who would ever defend people who even looked like there was a CHANCE that they were guilty.
In the universe we are talking about, the legal system in question is an alien one, and not every legal case has to be argued that way (with the losing lawyer dying in the end at the hands of its victor), only the most important ones: in other less important cases, honor can be restored with some kind of settlement ...
If the government had manufactured evidence [...]
You're mostly right up to this point: in the book (which is actually not Whipping Star, but The Dosadi Experiment, the second book in the series), a powerful alien faction commits massive (planet-scale, multi-generation) human and alien rights violations...
you would never find out [...]
... except Jorj X. McKie, agent extraordinaire of the Bureau of Sabotage (a government agency outgrown of the need of curbing bureaucratc efficiency, if you can imagine that!), finds out...
all because no lawyer would take a hopeless case.
... and takes on the hopeless endeavour of fighting the case on enemy ground (the byzantine alien legal system, of which he is the only registered non-native lawyer), knowing full well that he must win (for the sake of all what's good, but also love and revenge), and that if he wins, he'd have to kill his opponent (a female from the alien faction) and by doing this he'd be committing murder / stellar casus belli / trespassing jurisdiction / being rude or some other gross and terrible thing, I can't remember. How will he get out of this quagmire? ;)
I hope that was how all those Frank Herbert books ended. Corporations running the planet and corrupt governments going unchallenged.
Sorry to disapoint! :)
From my summary, you can see clearly all the pulp elements in the book (Rightful Retribution, yeah!), but they make for an enjoyable read, and really there is a lot more to it than that: in true Frank Herberts's style, the book has very typical themes that every reader of the Dune series should be familiar with (individual behaviour and adaptation under pressure, immortality, mind games, etc.) And of course it's also a book that makes you think, so I highly recommend it.
Hope this helps
Xavier