As Guo writes:

The Supreme Court has never really cleared up what it thinks about LGBT people. Not once has it said that sexual orientation is a suspect classification, like race or religion. But there seems to be a winking understanding that LGBT people do deserve some special consideration. “Formally, the issue is somewhat up in the air,” says Katie Eyer, an associate professor at Rutgers who teaches anti-discrimination law. “But I think most observers agree at this point that the federal courts and the Supreme Court in particular do give some level of meaningful scrutiny to laws that discriminate based on sexual orientation.”

Still, none of the Supreme Court’s four landmark LGBT rights cases—Romer v. Evans (overturning an anti-gay Colorado law), Lawrence v. Texas (striking down laws criminalizing sodomy), U.S. v. Windsor (gutting the Defense of Marriage Act), or Obergefell v. Hodges (overturning gay marriage bans)—designated sexual orientation as a suspect classification that warrants extra scrutiny by the courts.

That means laws affecting LGBT people are simply reviewed under a "rational basis" standard—meaning someone simply has to come up with some potential rationale for the law, even if that rationale seems farfetched. Or as a legal scholar once explained to me: “The rational basis test means that a law is constitutional as long as some fool can come up with a bad reason for a stupid policy.”

The legal challenge to NC's law claims that HB2 violates both the 14th Amendment and Title IX of the Civil Rights Act, but it’s the 14th Amendment Equal Protection claim that could be decisive.

The lawsuit in North Carolina urges courts to finally treat gender identity and sexual orientation as suspect or quasi-suspect classifications under the Equal Protection clause. This has long been a goal in the gay rights community. It would mean that politicians could no longer pass laws that target LGBT people without some serious explaining. [...] The North Carolina lawsuit has a long road ahead of it. But it has the makings of a milestone case. If it ever reaches the Supreme Court, it will force the justices to tackle an issue that they have repeatedly hemmed and hawed over. The court has ruled that bans on sodomy are unconstitutional. It has ruled that bans on same-sex marriage are unconstitutional, too. But is it constitutional for a law to discriminate against LGBT people? The Supreme Court has been mysterious on that subject for a very long time.

And if the Supreme Court found that discrimination to be unconstitutional, all these mean-spirited laws that are springing up around the country would be dead on arrival.