More than got away with it, actually... they prospered.
There has to be an incentive to not do these things as a government. There is none in the UK.
The only incentive governments ever have to not do bad shit is that the people will hate it so much that the government will wind up with less power than they started with.
But, decisions are ultimately made by individuals or small groups of them who have interest (profit, legacy, etc) in doing what the people wand and what is good for the people.
If enough people in government's personal interest is aligned with that of the people you get more outcomes that are aligned with the people.