Also known as "ex post facto laws". These are laws which make illegal an act that was legal when committed, increase the penalties for an infraction after it has been committed, or change the rules of evidence to make conviction easier. Supposedly the Constitution forbids this sort of governmental cheating, but in practice it is standard procedure in Police State USA.
And, when popular opinion is against the targets of these rule changes, no one seems to care.
Two common targets of these kind of "laws" are sex offenders and those who were convicted of domestic violence. I have heard other categories may be subject to these "laws" in certain places.
Yes, they might be horrible people. On the other hand, they may have agreed to plead guilty, believing it better to just get this ugly business behind them-- after all, the accepted punishment seemed tolerable-- only to find the rules changed later, after the debt was thought to be paid.
It's dangerous to even stand with these victims of government cheating and against these kinds of "laws", because you'll be seen as standing with a hated class of people. However, if government can violate the Constitution to heap more punishments on those you hate, it can do the same to you.
Just imagine if you paid a "fine" for speeding a decade ago, then suddenly a new "law" says if you have ever pleaded guilty to a traffic offense (and they define paying the "fine" as an admission of guilt) you forever "lose your right" to own or operate a motor vehicle. And you will also be prohibited from owning firearms or any "dangerous weapon" for the rest of your life. And whatever else they decide to saddle you with. Perhaps a registry you are required to inform of your every move so they can keep tabs on you.
What's to stop the government from coming up with exciting new punishments whenever it suits them? To the cheering, or the yawns, of a population who doesn't see it as affecting them at all, but only "Those People"; those "criminals".
Don't think it could happen? Then you don't understand the nature of government.
If you're OK with government doing this to some people, who do you expect to come to your defense if (or when) government decides to do it to you?