This, from David W. Tollen’s excellent Tech Contracts Handbook, is a simple explanation for why you should always formalize your relationships with a written contract, and leave nothing to a handshake and “an understanding”:

Why do we sign contracts? It’s not because we want to win a lawsuit later. It’s not because we don’t trust each other. It’s not even because we’re afraid lawyers will stir up trouble if they’re not kept busy.

We sign contracts because good fences make good neighbors.

The best way to avoid arguments in a business relationship is to write down the parties’ expectations ahead of time. That list becomes a boundary marker—like a fence between neighboring yards—explaining who’s responsible for what. If the parties disagree, they can look at the list for guidance.

In other words, contracts prevent disputes—at least, good ones do. They prevent lawsuits.

Even if the parties never look back at the contract once it’s signed, it’s still probably played a vital role. When people put their business expectations on paper, they often find those expectations don’t match. Just the act of negotiating a written contract will uncover many mismatched expectations. The parties can address them before starting work.

Yes, it’s true that we sometimes fight over contracts in lawsuits. And yes, in interpreting a contract, we often talk about what a judge would say it means. But that’s only because courts have the ultimate say if the parties can’t agree. Job No. 1 for the contract is to keep the parties out of court.

This is a great explanation. The process of negotiating and writing out a contract is often more important to the relationship than the threat of enforcement. It’s the process of line drawing and fence building that makes for great neighbors, rather than the sanction against trespass.