In common law, a test of reasonability is followed. An agreement in restraint of trade is valid, if:
There is a valid interest that the party imposing the restraint is trying to protect.
The restraint is no more than that which is necessary to protect this interest.
Restraint is not contrary to public interest.
All of the above.
Ensuring freedom to the contract would mean legitimizing agreements in restraint of trade, which would result in parties agreeing to curb competition. Hence option D.