In my first year Contracts class in law school, we learned about liquidated damages; i.e. a clause stating that a certain amount of money is a reasonable estimate of a party's damages in the event of a default and that, in lieu of litigating the question of damages, the stipulated amount will serve as actual damages and not as a penalty.
Liquidated damages play an important role in many real estate contracts. I like them for both sides. It can limit the buyer's downside and quantify the seller's compensation if a deal goes bust. Most every big deal I run across has a lengthy liquidated damages clause, and more often than not the amount of the earnest money deposit is the stipulated sum. But this excellent article (about, of all things, the opulent former Adelphia Communications headquarters in Pennsylvania) reminds us that liquidated damages (a) should be tightly drafted; and (b) are supposed to be a reasonable estimate of the actual damages, not a number thrown out there. (I have not read the contract in question here.) It also reminds us that a seller can sometimes have a windfall in the event of a buyer default; in this case when the buyer defaulted the seller found a buyer who closed at a slightly higher price. The court nevertheless agreed that the provision was not a penalty, particularly because of evidence of what the actual damages could be. The fact that there were no little or no actual damages didn't matter.
Of course, the other big lesson is to have an honest lawyer. The buyer wired its lawyer $2 million to send to the escrow agent, who then let another client borrow the money. That other client tried to flee the country but was caught. The lawyer, of course, defrauded his client and was disbarred. Ouch.