Public policy

     A court may refuse to enforce a contract or some of its terms if the contract or the terms violate public policy.  In some cases this is an easy decision for a court to make.  A federal or state statute or regulation or a local ordinance may specifically provide that a term in a contract or a contract is unenforceable and void.  For example, section 2929 of the California Labor Code provides: 

No employer may discharge any employee by reason of the fact that his wages have been subjected to garnishment for the payment of one judgment. A provision of a contract of employment that provides an employee with less protection than is provided by this subdivision is against public policy and void.

Likewise, a court will refuse to enforce a contract whose terms require the commission of a serious crime (e.g., the proverbial "hit" contract), even though the statute criminalizing the behavior makes no reference to contracts whose terms require or otherwise implicate such behavior.   

     Decisions on enforcement become more difficult in other cases, when it may be more difficult to discern if a public policy is implicated by enforcement of a contract or contract term, or when there may be good reasons to enforce the contract notwithstanding some inconsistency with an identified public policy.  See Problem.Dispute.Settlement of tort claim (Part B).  In such cases, R.2d Contracts 179 reflects common law decisions about how to discern a public policy and, where one has discerned a relevant public policy, R.2d Contracts 178 calls for a balancing of the interests favoring enforcement against the interests against enforcement. Trotter v. Nelson, involving a lawyer's agreement to pay referral fees to an employee, is a nice illustration that will also give you a leg up on your legal ethics class. 

    Supplementary reading:  Farnsworth, 5.2 - 5.9.