Two men are observationally identical — same education, same years of experience — and yet one earns 16% less than the other. Why? Because the lower income earning man has, at some point in the last five years, had sex with another man. That might sound like evidence of workplace discrimination, but new research argues that gay men are trading off higher salaries in favor of working in more tolerant firms.

Workplace discrimination is a problem not just for the individual who is being discriminated against, but also for the economy as a whole as it prevents employers from either hiring relatively productive workers because they are part of a group that is discriminated against or, just as likely, prevents them from giving those workers the support they need to be productive in their jobs.

The best example of this is evidence that symphonies will hire male musicians over superior female musicians because of their gender — gender discrimination prevents orchestras from producing the highest quality music as possible.

At the same time, wages aren’t everything and sometimes workers will choose jobs that have lower salaries if employers can offer them some quality in the job they value other than money — they are willing to be paid a compensating differential.

For example, a woman might forgo a high-paying job in favor of one that makes it easier for her to balance her work and home life.

Unlike gender or race, sexual orientation is a personal trait that can be concealed from employers, but according a new paper in the Eastern Economic Journal, the cost of concealment is sufficiently high that gay men are choosing a different path — to forgo higher paying jobs in favor of working in environments that make it easy for them to live as an openly gay man.

According to the author of this paper, economist Michael Martell, the cost of concealment is significant and includes stress and increased cognitive dissonance. Concealment also distances gay men from their coworkers and reduces their productivity in the workplace. Plus, creating and maintaining false identities is time consuming and fraught with risk of exposure.

The upshot of this argument that gay men self-select into lower paying jobs is that it is not intolerant, or discriminating, employers who are responsible for the lower wages paid to gay men, but rather the employers who create tolerant spaces for them to work in.

Which, reminds me of a story.

Not so many years ago, a friend of mine was applying for academic jobs at U.S. universities. She is heterosexual, but being on the far side end of “marrying age” and still single, more than one potential employer made assumptions about her sexual orientation. Over the course of her interviews with these employers they actively sought to impress upon her how tolerant they were of her (inaccurately presumed) sexual orientation. One committee went so far as to arrange for a lesbian colleague from another department to take her for dinner and impress upon her how good the same-sex dating scene was in their community.

As absurd as this behavior may sound, if employers can avoid paying workers high wages by providing a tolerant work environment then, why not?

The question that remains then is if the profit maximizing behavior of firms is to create work environments that are tolerant of the variety of sexual orientations, then why don’t more firms work to promote the tolerance in their workplace?

I would argue that the number of firms responding to this particular opportunity to profit is on the rise. In fact, the recent trend in which large firms are visibly lending their support to the equal marriage debate has the dual purpose of signalling to potential employees that they provide tolerant workplace environments. Thus while these firms risk alienating some of their intolerant consumers, they gain favor both with the growing proportion of the population that is tolerant and with workers who will accept lower pay in favor of tolerant workplaces.

Looks like the start of a virtuous cycle; one that should end, with any luck, in an equilibrium in which all profit maximizing employers promote tolerance in their workplaces and all workers are paid the same regardless their sexual orientation.

That might sound like a fairy tale, but I am nothing if not an optimist.

This post originally appeared on my blog at Psychology Today.