Last Week Tonight host John Oliver pointed out a jarring contradiction on Sunday night: In most states, it is now legal for a gay couple to get married, but it's also legal for employers to fire that couple, for landlords to evict them, and for business owners to refuse service to them — entirely because of their sexual orientation. "Discriminating against gay people is surprisingly legal in much of the country," Oliver said.

Oliver is right, although the problem also extends to transgender people. In 31 states, anti-LGBTQ discrimination isn't explicitly illegal in the workplace, housing, or public accommodations (restaurants, hotels, and other places that serve the public), because these states don't include protections against discrimination based on sexual orientation and gender identity in their civil rights laws. And although some advocates argue that the federal Civil Rights Act may protect LGBTQ people through protections against sex discrimination, there's no federal law explicitly protecting these groups.

In 31 states, discrimination against sexual orientation and gender identity in the workplace isn't illegal

"While federal law may guarantee a gay couple's right to get married, it offers exactly zero guarantees about their right to do things that normally follow that," Oliver said, "like signing a lease on an apartment they can't afford, or conducting tense discussions about finances in the brightly lit tapas restaurant of their choosing, or marching into any bank and applying for a small business loan to get Brenda's stupid cupcakes-for-dogs idea off the ground."

Most Americans think this type of discrimination is already illegal

"If you are surprised by this, don't worry, you're not alone," Oliver said. "A 2013 poll showed that nearly 70 percent of people thought it was illegal under federal law for someone to be fired for being gay. People believe it because it feels like it should be true. It's optimistic, but wrong."

"There are plenty of recent real-life examples of discrimination happening"

Oliver pointed to three recent examples of anti-gay discrimination:

A Texas children's social worker was reportedly fired because of his sexual orientation after he had his fiancé — a man — come in and help him with a field trip. "Later in that week, I got a text message from the president of Children's Home saying I needed to come meet with him," Casey Stegall, the Texas worker, said, "and then told me because of my lifestyle choices he didn't feel comfortable having me on his team anymore." At the Texas restaurant Big Earl's, a gay couple was told to stay away. "[Our waitress] said that … 'we don't serve fags here,'" Colin Dewberry, one of two gay patrons who were kicked out, said. "'Here at Big Earl's, we like for men to act like men and for ladies to act like ladies.' And it was just so nonchalantly — almost like she was reading a piece of paper." A Michigan pediatrician allegedly refused to treat a lesbian couple's baby because of their sexual orientation. "We're not your patient. She's your patient," one of the moms said. "Your job is to keep babies healthy. And you can't keep a baby healthy that has gay parents?"

Why religious freedom shouldn't justify discrimination

"The main argument against extending these protections is that it might infringe on religious freedom, forcing people to act against their religious beliefs," Oliver said. "We allow religious freedom in limited, sensible ways all the time — it's why Muslims can wear a hijab in their driver's license photo and why devout Christians can't be forced to work on the sabbath. But there are reasonable limits to it."

He added, "Courts have already decided there are limits on religious freedom. For example, they found that you can't discriminate on race based on your religious beliefs. And there are limits on free speech: You can't yell 'fire' in a crowded theater. The Constitution isn't the star in Super Mario Bros. — it doesn't make you invincible so you can do whatever the fuck you want."