At various times in history, those in power have figured out that if those not in power have some legal recourse for grievances, they're less likely to violently overthrow those in power.
Exactly. But we rarely see that; most of the time it's just the powerful abusing the law so outrageously that I'm astonished there's not been a revolt. The people would probably figure they have nothing to lose by fighting, at this point.
This happens in the Real World when you have an obsolete law that is no longer relevant, so no one actually enforces it, but it's still on the books.
Yes, but the key phrase in my complaint is "plainly ridiculous." If the heroine's opponents are going to go to the trouble of applying an outdated law to take up her time, they should be smart enough that they're not selecting something that's self-evidently dumb.