Many people have argued that sexual orientation discrimination should be treated like race discrimination. Sexual orientation and race, the argument goes, are both characteristics that are almost entirely irrelevant to a person’s ability to do certain things, and are outside the person’s control.

The sexual orientation discrimination argument also has to take the next step, which is to explain why discrimination based on sexual conduct should be treated the same way, since obviously homosexuals are free not to engage in homosexual conduct. But there too the race discrimination analogy is helpful; race discrimination laws bars discrimination based on people’s relationships with people of some race (so it’s illegal to fire employees for engaging in interracial dating or marriage). What’s more, to the extent that sexual orientation discrimination is discrimination based on conduct, it is conduct (like dating outside one’s race) that people should be free to engage in, without fear of losing their jobs or other valuable things.

Now of course there are various responses to this. There are factual or moral disagreements with the assumptions of the argument I outlined above. For instance, some say that sexual orientation is within a person’s control; others say that it is relevant more often than some might think. Some say that entering into a same-sex relationship is a basic right that we should all be able to engage in free of economic retaliation; others disagree. There are also other kinds of disagreement, too.

But here I want to focus on one point: There are multiple possible analogies to sexual orientation discrimination, even if one views sexual orientation as usually morally and practically irrelevant, and sexual conduct as a basic right; and sometimes it matters a good deal which analogy should be used.

1. One analogy, of course, is standard race and ethnicity discrimination, which is banned in many situations, and socially condemned even in many cases where it’s legal. (For instance, if someone says “I’d like to have dinner tonight just with white people,” many people would condemn this attitude, even if they agree that the person should have the legal right to make that choice.)

2. But there’s also sex discrimination. One’s sex is also outside a person’s control (unless one goes through very onerous procedures), and also largely irrelevant to a person’s abilities. Yet sex discrimination is banned in fewer situations — there, are for instance, exemptions from sex discrimination law related to privacy — and socially condemned in fewer situations. (For instance, if someone says “I’d like to have dinner tonight just with the boys / the girls,” many fewer people would condemn that.)

3. There’s religious discrimination. Whether religion is outside a person’s control is a complicated question, and so is the question of how relevant religion is to predicting behavior. Still, the law does generally bar religious discrimination, likely for a mix of two theories. The first theory is that, even if people can change their religion, those people shouldn’t be pressured to do so — this would be the right-to-do-something justification for antidiscrimination rules, rather than the can’t-help-it justification or the it’s-irrelevant justification. The second theory is that religious beliefs, even if sometimes relevant to a person’s capabilities and dispositions, are relevant much more rarely than some might believe.

Yet the matter is more complicated than with race. We don’t, for instance, generally condemn a social preference for one’s coreligionists.

Likewise, bans on religious discrimination in employment and education are narrower than such bans as to race discrimination. Private schools and universities, even ones that take federal funds, are generally allowed to discriminate based on religion in admitting students. And while private employers generally may not discriminate based on religion, Title VII and many similar state laws exempt religious institutions that discriminate in favor of employees of their own faith. (This is a separate exemption from the constitutionally mandated exemption from all discrimination laws as to clergy and similar employees; it applies to all employees of religious institutions, including janitors, bus drivers, and others.)

4. There’s discrimination based on political beliefs. In many ways, political beliefs are like religious beliefs, but in some ways many people view them as different. (Is it that they are morally or practically relevant in ways that religious beliefs are not? Why?) As a result, while the government is limited in discrimination based on political beliefs, and some states limit such discrimination as well, federal law generally does not ban discrimination by private employers based on political beliefs, and those legal rules that do limit such discrimination often have substantial exceptions.

5. There’s also height discrimination, and other aspects of appearance discrimination. Height is also pretty much outside a person’s control, as are many (though of course not all) other aspects of appearance, and it’s also largely irrelevant to a person’s physical abilities, with a few exceptions.

Yet height discrimination is legal almost everywhere and in almost all contexts (even when there’s no reason other than the discriminator’s or others’ preference for it), and it’s rarely socially condemned. (One might think that someone who discriminates based on height is shallow or is acting in an unfair way, but such people are rarely faulted more harshly than that.) Note also that, to the best of my knowledge, height discrimination against short men is indeed pervasive, both in business and in social life, and quite substantial in magnitude. Likewise with discrimination against ugly people.

One can of course add other categories, although some (such as age or disability) are fairly often relevant to a person’s ability, and others (such as marital status) are more easily changeable though the legal system’s view is that people shouldn’t be pressured into changing them. But the categories given above help show that there are several different ways in which the legal system treats discrimination based on immutable and largely irrelevant attributes, or based on behavior (such as acceptance of a particular religious view or political view) that is thought to be a basic right.

And these rival analogies would often lead to quite different results in modern controversies. For instance, consider President Obama’s executive order barring sexual orientation discrimination in employment by government contractors. A big part of the debate here is whether sexual orientation discrimination is more like political discrimination or appearance discrimination (which is generally not barred for federal contracts) or like race discrimination.

But a big part is also whether it’s more like religious discrimination or like race discrimination. As I mentioned, existing federal law exempts religious institutions from the ban on religious discrimination (at least when it comes to preferences for their coreligionists). The earlier executive order banning race, sex, and religious discrimination by contractors, which Obama’s order is amending, likewise exempts religious institutions from the ban on religious discrimination.

If you think sexual orientation should be treated like religion, then religious institutions should likewise be free to discriminate in favor of people who adhere to the institutions’ beliefs on sexual behavior (or at least who don’t publicly act in ways that reject those beliefs). Indeed, several of the states that ban sexual orientation discrimination in employment expressly extend the religious institution exemption to cover both religious discrimination and sexual orientation discrimination, though other states do not. (My quick search suggests that Delaware, Iowa, Maine, Maryland, Minnesota and Oregon are examples of states that to some extent exempt religious institutions from their sexual orientation discrimination bans, though the details vary.)

Likewise, what analogy we choose is especially important in the Boy Scouts controversy. They are, after all, the Boy Scouts — a group that discriminates based on sex, that is legally allowed to discriminate based on sex, and that most people (I suspect) would not condemn for discriminating based on sex (either in choice of group leaders or in choice of scouts). Likewise for the Girl Scouts.

Moreover, the Boy Scouts at least officially discriminate based on religion, although apparently only against nonbelievers, and not in favor of any particular religion, and without any exclusion of religions that see no problem with homosexuality. So figuring out whether we should view sexual orientation discrimination as being like race discrimination, like sex discrimination, or like religious discrimination is pretty important there, even if we conclude that sexual orientation discrimination shouldn’t be treated like the many generally legally permissible forms of discrimination.

It’s not enough, then, to conclude that sexual orientation discrimination isn’t like, say, intelligence discrimination or wealth discrimination, or even like appearance discrimination, all of which are generally allowed. Even if one thinks that sexual orientation discrimination is generally similar enough to some of the prohibited grounds for discrimination, there needs to be an argument as to why, for instance, it’s closer to race discrimination than to sex discrimination or religious discrimination (or vice versa).