The prosecution was wrong to charge them at all, and a successful conviction was wrongly achieved, but they did it all under the color of existing law.
Add to that, the existing law is an ass, of course.
Astute politicians would look into grievances and accordingly make changes to said laws if need be, and possibly commute sentences to less severe that were misapplied.