Kristin Murphy, Deseret News
Weber County Clerk Ricky Hatch opens the doors to the Weber Center to tell hundreds of gay couples waiting to get marriage licenses that they will have to come back Monday in Ogden on Saturday, Dec. 21, 2013. Ramona Gurule, center, came to watch her son Jesse Gutierrez, right, get married. Gutierrez and his partner were first in line, waiting at the Weber Center since 11:30. The Weber County Clerk's Office intended to open for one hour Saturday, but told the hundreds of couples waiting that they couldn't due to security requirements and possible violations of equal protection provisions.

Two centuries ago, the French philosopher Montesquieu praised “sweet commerce” in “The Spirit of the Laws,” arguing that markets soothe political passions and let communities live in peace. It’s a lesson that the citizens of Portland, Ore., and Silicon Valley would do well to remember.

Last week Brandon Eich, the inventor of JavaScript, which runs much of the Internet, resigned as the CEO of Mozilla. His sin was not managerial incompetence. Rather, gay rights supporters threatened to boycott Mozilla because Eich made a $1,000 donation in support of Proposition 8, the California referendum reversing a state court decision mandating same-sex marriage.

At the other end of the commercial spectrum, two small businesses in Portland, Ore., face potential ruin as a result of boycotts. The first is an organic grocery store targeted by gay rights supporters because the owner denounced same-sex marriage on Facebook. The second is a restaurant owned by a passionate supporter of same-sex marriage who had the temerity to suggest – also on Facebook – that boycotting the grocery store was a bad idea.

Our society must find ways to live peacefully and productively in the face of often-deep disagreements on matters of morality, politics, or religion. Democracy, with its apparatus of rights, elections, checks, and balances, is one response. The market is another.

Indeed, compared to democratic politics, market exchange is a miracle of productive cooperation. Seeing conservatives and liberals work together on Capitol Hill is newsworthy, but those with equally clashing convictions routinely cooperate within firms or markets.

For this we can be truly grateful. A world where all commercial interactions were confined to the ghetto of one’s own ideological tribe would be a nightmare for two reasons.

First it would be infinitely poorer. The ability to call on the talents and industry of those with whom we disagree makes our lives more prosperous. As Adam Smith long ago recognized, a tightly confined market is a recipe for poverty.

Second, trading only with those whose convictions we share robs us of what Montesquieu called the “gentling of our manners.” Rubbing shoulders and making deals with ideological enemies has a way of lessening enmity, forces the reconsideration of prejudices, and ultimately increases tolerance and community.

One might object that we should be free to take our business where we please and point out that boycotts have done much good in our history. After all, what’s wrong if you don’t want to be complicit in the business of a person whose beliefs you find morally objectionable?

I don’t think the law should punish those boycotting the businesses in Portland or Mozilla. Markets thrive on freedom of contract and that freedom must include the right not to contract. But just because something is legal does not mean it is wise.

The peaceful cooperation of the market is not natural. Rather it is a social achievement, one that rests on habits of trust and tolerance. Those habits can be broken and undermined. Boycotts may be justified in extreme cases, but they are always destructive, poisoning sweet commerce with the acrimony of politics.

Ultimately, the interdependence of the market is part of what binds us together as a nation. Being complicit in one another’s actions is part of what makes us a community rather than random collection of individuals. We lose something precious when ideology becomes the litmus test for trade.

Nathan B. Oman is a professor at William & Mary Law School. uu He can be found on twitter at @nate_oman.