In 1992, I went to San Francisco’s Candlestick Park to see the Giants play the Cincinnati Reds. To get into the baseball spirit, I wore my blue L.A. Dodgers helmet. (I root for both the Giants and Dodgers, but I figured why buy a Giants’ helmet when I already had a Dodgers’ one?) I was sitting in the stands when a young man came by selling hot dogs. Because he was about 40 feet away, rather than try to shout above the din, I put up one finger for one hot dog. The young man looked at me, noticed my helmet, pointed to his own head symbolizing my helmeted head, and shook his head as if to say, “No, I won’t sell you a hot dog because you’re a Dodgers fan.” Then he grinned and I grinned, and he passed the hot dog down the row. We both knew that he would sell me the hot dog. There was no way he was going to refuse to make money off me even if I was a Dodgers fan.

This story of how the free market broke down discrimination may sound trivial. If it just had to do with my hot dog, it would be. But the story illustrates a much wider and crucial point: Markets are especially good at breaking down discrimination when what is exchanged is goods rather than labor. Think about how little you know about the politics, race, gender, or even nationality of the person who makes the bread you buy. You don’t know because you don’t care. What you care about is getting the best deal on bread, and even if this means buying it from someone whom you would hate, you’ll still buy the bread. That’s why, for example, even book stores whose owners and employees detest Rush Limbaugh still displayed his books prominently. By trying to hide the books, which apparently some stores did for a short time, they would pass up precious sales.

One of my favorite lines in a movie is in the scene in The Magnificent Seven where Yul Brynner tries to persuade the local hearse driver to risk getting shot while taking a dead Indian to be buried in dignity in boot hill. When the driver declines, Brynner asks, “Are you prejudiced?” The driver answers, “When it comes to saving my life, I’m downright bigoted.” The market illustrates the opposite point. When it comes to saving their economic lives, even otherwise prejudiced people are downright tolerant.

The above is a slightly edited excerpt from my book The Joy of Freedom: An Economist’s Odyssey.