The government enforces contracts, so it gets to choose which contracts it enforces. Without a functioning judicial system (and a law enforcement system to enforce its verdicts), a contract is a piece of paper.
Plenty of contracts benefit both parties but are bad for society as a whole, and if the government pre-signals which sorts of those contracts it will refuse to enforce, this is good for society.