Unless you have the money to hire your own attorney you may as well not even have an attorney. It costs the DA nothing personally to take a trial to court, but it bankrupts the average family. In the meantime, because of the proliferation of laws and regulations the prosecutor with the full weight of the law can make life miserable by threatening your family or looking for any number of other offenses.
Even though the local judge was pretty fair, they really do not have the power. By the time it gets to the judge it is already plead out most of the time because the DA can threaten such huge fines and jail time, just like this case.
It may be legal, but such unrestricted use of power is often immoral.