Why Law Exists
Two farmers argue over where one field ends and another begins. No judge exists to decide the matter, no police to enforce a ruling, no written record of who planted the boundary trees. In most of human history, disputes like this were settled by strength, family alliance, or the threat of retaliation. The question this article asks is not what laws say, but why any society bothers to create them at all.
Law is so woven into daily life that it can feel invisible, like plumbing or electricity. People notice it mainly when it fails or when they break it. Yet every legal system, from ancient Babylon to a modern traffic code, answers the same basic problem: how do strangers who do not trust each other, and who may never meet again, agree to live and trade together without constant violence?
That problem sounds abstract, but it is intensely practical. It shapes why contracts are enforceable, why property can be bought and sold with confidence, and why a stranger can walk into a shop and expect to leave with what they paid for. Understanding why law exists means understanding what happens in its absence, and why humans have never been satisfied leaving that gap unfilled.
The Problem Before Law
Small, close-knit groups can manage disputes without formal law. When everyone knows everyone, reputation does much of the work that courts do today. A person who steals from a neighbor faces shame, exclusion, or revenge from the victim’s relatives. Anthropologists studying stateless societies have documented systems of custom, mediation, and retaliation that kept order without written codes.
The trouble is that these informal systems scale poorly. Reputation only constrains behavior if people expect to interact again, and revenge only deters wrongdoing if the threat is credible and proportionate. Once trade extends beyond the village, once cities bring together people who share no kinship and no shared history, informal enforcement breaks down. A dispute between strangers has no elder to appeal to and no shared community to apply social pressure.
This is the gap that law was built to close. It replaces personal vengeance, which is unpredictable and prone to spiraling, with a shared, publicly known set of rules that apply regardless of who the parties are. That shift, from private retaliation to public rule, marks one of the oldest transitions in organized society.
The First Attempts to Write It Down
The Code of Hammurabi, inscribed in Babylon around 1754 BCE, is among the earliest surviving attempts to make legal rules explicit and public. Carved onto a stone stele and displayed for anyone to see, it listed specific penalties for specific offenses, from property disputes to family obligations. Historians debate how consistently it was actually applied in practice, but its existence signaled something important: rulers wanted subjects to know, in advance, what the rules were.
Centuries later, Rome’s Twelve Tables, compiled around 450 BCE, arose partly from a political demand. Plebeians, the common citizens, had grown frustrated that the patrician elite controlled legal knowledge and could interpret unwritten custom however it suited them. Publishing the law in a form ordinary citizens could read reduced that arbitrary power, at least in principle.
Both examples point to the same underlying function. Written law is not simply a list of punishments. It is a public commitment. It tells people, including the powerful, what the rules are before a dispute arises rather than after, which limits the ability of anyone in charge to bend the outcome to their advantage after the fact.
Why Philosophers Have Never Agreed on What Law Really Is
Ancient codes explain how law began, but philosophers have spent centuries arguing about what law fundamentally is and where its authority comes from. Their disagreements are not academic hairsplitting. They shape real debates about whether an unjust law must still be obeyed.
Law as Reflection of a Higher Moral Order
One influential tradition, associated with thinkers such as Thomas Aquinas, holds that human law draws its legitimacy from a deeper moral order, sometimes called natural law. On this view, a rule that grossly violates fundamental justice is not truly law at all, regardless of who enacted it or how properly it was passed. This idea has echoed through history, including in arguments used against unjust regimes, because it gives people grounds to say that some laws deserve defiance.
Law as Social Fact, Not Moral Judgment
A competing tradition, developed by legal theorists including John Austin in the nineteenth century and refined by H. L. A. Hart in the twentieth, argues that law is simply a social fact: a system of rules recognized and enforced by a society’s institutions, regardless of whether those rules are morally good. Hart’s 1961 book “The Concept of Law” distinguished between primary rules, which govern conduct, and secondary rules, which establish how laws are made, changed, and adjudicated. This approach, known as legal positivism, separates the question “is this valid law” from the question “is this law just,” treating them as two different inquiries rather than one.
Law as a Bargain Among Strangers
A third tradition, developed by Thomas Hobbes, John Locke, and Jean-Jacques Rousseau, frames law as the product of an implicit agreement among individuals. In his 1651 work “Leviathan,” Hobbes argued that without a common authority to enforce rules, human life would collapse into a state of constant insecurity, since no one could trust that others would restrain themselves. People escape that condition, in this account, by surrendering some personal freedom to a governing authority in exchange for protection and predictable order. Locke’s 1689 “Second Treatise of Government” offered a related but softer version, arguing that government exists to protect rights people already hold, and that its legitimacy depends on the consent of the governed.
These theories disagree on where law’s authority comes from, but they converge on a shared insight: law exists because unrestrained individual judgment, however well-intentioned, cannot reliably produce peaceful cooperation among people who do not already trust one another.
What Law Actually Does Day to Day
It is tempting to think of law mainly as a system of punishment, something that exists to catch and penalize wrongdoers. That view captures only part of the picture. A large share of what law does is not punitive at all. It is coordinating.
Consider something as mundane as driving. Traffic law does not primarily exist because officials distrust drivers. It exists because everyone benefits when there is one predictable rule, such as driving on the right side of the road, that all parties can rely on without negotiating it fresh at every intersection. The specific rule matters less than the fact that everyone follows the same one.
Contract law works the same way. When two strangers agree to a deal, neither can be fully certain the other will follow through. Enforceable contracts convert a personal promise into something backed by a shared institution, which allows people to trade with confidence even when they have no personal relationship and no reputation at stake. This is why economies with reliable contract enforcement tend to support more complex, long-distance trade than economies where agreements depend purely on personal trust.
Property law performs a related function. It converts a contested claim, “this is mine,” into a publicly recognized and defensible right, reducing the likelihood that ownership disputes escalate into violence. In each case, the deeper function of law is not punishment but the reduction of uncertainty between people who cannot otherwise verify each other’s intentions.
What Popular Understanding Gets Wrong
A common assumption holds that law and morality are essentially the same thing, so that whatever is legal must be right and whatever is illegal must be wrong. History provides abundant evidence against this equivalence. Laws upholding slavery, apartheid, and various forms of discrimination were legally valid within their own systems while being morally indefensible by nearly any standard applied today. Recognizing that a rule is legally binding says nothing, by itself, about whether it is just.
A second misconception treats legal rulings as the mechanical, neutral application of fixed rules to clear facts. In practice, laws are often written in general language that must be interpreted, and reasonable judges frequently disagree about how a statute applies to a specific case. Legal realists in the early twentieth century argued that judicial reasoning is shaped not only by legal text but by judgment, precedent, and institutional context. This does not mean law is arbitrary. It means that applying law involves interpretation, not simple mechanical calculation.
A third misconception assumes that law is primarily about restraining bad actors. In reality, much of law’s value comes from enabling cooperation that would not otherwise occur, allowing strangers to form companies, transfer property, and make long-term commitments they could not safely make on trust alone.
Why This Still Matters
Modern economies, international trade, and scientific collaboration all depend on the same underlying function that ancient law first attempted to provide: predictable rules that let people who do not know each other cooperate anyway. A global supply chain depends on contract enforcement across borders. A patent system depends on a shared understanding of what counts as intellectual property. Even international relations rely on treaties that function, imperfectly, as law among states that have no single sovereign above them.
Debates over what law should require, and how strictly it should be enforced, are really debates about how a society decides to answer the original problem: how to manage disagreement between people who cannot simply be trusted to work it out themselves.
Law exists because informal trust breaks down at scale, and because unrestrained individual judgment cannot reliably prevent conflict among strangers. It is not, at its core, a mechanism for punishing the wicked. It is closer to a shared technology for making cooperation possible between people who might otherwise have no reason to trust one another at all. The specific content of law changes across centuries and cultures, but the problem it answers has never gone away.