Markets, by definition, rely on cooperation and coordination. Buyers must cooperate with sellers in order to exchange; the seller must offer something the buyer wants and the buyer must offer something the seller wants. Only through this cooperation can a trade occur.
Likewise, buyers and sellers must coordinate. The buyer must be in the same place as the seller*. A coordinating agent (ie a middleman) may sometimes be used to bring buyers and sellers together (think, for example, a realtor that brings home buyers to the home seller). Similar to cooperation, buyers and sellers must coordinate on what to exchange and what their expectations are.
Cooperation and coordination are vital to the market process.
Economic texts tend to focus primarily on the coordinating and cooperation aspects of the market process, as they rightfully should, but a key factor is left out of the equation; that factor is the law.
Law here refers to the “rules of the game.” Law is both written and unwritten; it is the set of rules, customs, norms, etc that develop through people’s interactions with one another. Law, while shaped by peoples’ interactions, also shapes those interactions.
Law provides a useful form of coordination: who can sell what, what/how promises should be kept, what remedies exist for lawbreaking, that sort of thing. Without law, and especially property rights, the coordination necessary for the market process would break down.
Consider, for example, property rights. Property rights are a form of law; they may be formal (in the case of a deed registered at a local governmental authority) or it may be informal. Property rights allow the market process to occur by defining who can trade what. In other words, who owns the right to the use of a piece of property. Ultimately what is being traded in any situation is a bundle of property rights. If these are not clearly defined, then folks cannot know how to trade. There cannot be coordination nor cooperation in this case.
Clearly-defined property rights are important to market transactions, but no property right will always and everywhere be perfectly clear. We live in a world of “incomplete contracts.” Not all possible situations can be anticipated and to write and understand property rights that take into account all possible conflicts is both physically impossible and economically wasteful (marginal cost exceeds marginal benefit). In these ambiguities is where law also helps the market process. Law, preferably by drawing on established rules of adjudication and precedent, can resolve these conflicts and allow the market process to function better (this was one of the great insights of Ronald Coase).
Law, of course, can have its own problems. Just like any institution (including the market), it can be abused. But it is vital to the coordination and cooperation functions of the market process. Without law, trade cannot exist. Only war.
*This place need not be physical