Before people are willing to engage in any social relationships, including market exchange, there needs to be some minimal degree of predictability about the rules that apply to their interaction. Once a social system gets bigger than the family, and especially after if gets big enough that no one knows everyone else well enough to predict his behavior, both church and state emerge for the purpose of establishing and enforcing rules so that some level of predictability can be maintained. Before people are willing to buy what someone else wants to sell, there must be clear rules in place that define property, the meaning of ownership, and the conditions under which various kinds of property can be exchanged. Much of market exchange involves promises of actions which will take place in the future. A buyer and seller who enter into some sort of voluntary agreement to do something at some time in the future must be able to compel each other to do what they promised.
Governments make the laws which enable each party to enforce the terms of the contract on the other.
A contract that cannot be enforced is absolutely worthless. While it is probably true in a small society that one who reneges on a promise will soon find that no one will enter into an agreement with him, once the market begins to bring together people who do not know each other, it is essential that the state provide the backing for an individual's attempts to remedy a breach of contract. There must be rules governing the exchange itself. Some of these involve what can and cannot be sold. What is advertised to induce a buyer must be sold as described in the advertisement.