The difference between Mafia and the Government is, whatever Mafia does is illegal and whatever the Government does is legal. Whether the activity is ethical/unethical or fair/unfair does not matter.
It is unethical to change some law in retrospective and penalizing the other party for the old transactions.
When a law is introduced, people would act based on the clauses in the law. Once the transaction is completed, if the Government goes back in time and changes the law that negatively impacts the other party is absolutely unfair.
Pranab Mukherjee introduced a draconian law that taxed many organizations in retrospective. By that law, all the old transactions are revisited and many organizations were asked to pay extra tax. His response to that law was, if the law was that bad, why the next Government did not change it. The implicit assumption was, the next Government is better than his Government (atleast in Taxation and related fields).
Eventhough International Court and the courts of 9 other countries have stricken off (specific instances), Indian Government still did not learn and is continuing with unethical laws and harassing others.