FORTUNE — In August 2013, transgender television personality B. Scott filed a suit against Black Entertainment Television and its parent company Viacom Inc., claiming that the network had discriminated against him based on his gender identity and sexual orientation.
The lawsuit stemmed from Scott’s appearance as a style correspondent at the 2013 BET awards preshow. After his first segment of the night, in which he appeared with heavy makeup and heels, the network told him to tone down his look and change into masculine clothing that was “different from the androgynous style he’s used to … and comfortable with,” according to the complaint.
A Los Angeles Superior Court judge decided the case Wednesday, and it came down to the First Amendment; not Scott’s freedom to speech and expression, but Viacom’s (VIA). The court found that BET’s decision as to how Scott would appear on camera was part of the network’s creative process of developing and broadcasting the show, which is protected by the First Amendment.
MORE: Americans have fallen in love with real estate once again
The case is by no means the first in which a media company has used the First Amendment as a defense against lawsuits alleging discrimination. The order on Thursday cites several other instances.
There was the racial discrimination case against ABC for its failure to feature non-white contestants on The Bachelor and The Bachelorette. A federal district court in Tennessee dismissed the matter after finding that “casting decisions are a necessary component of any entertainment show’s creative content.” The court said that “the plaintiffs seek to drive an artificial wedge between casting decisions and the end product, which itself is indisputably protected as speech by the First Amendment.”
And there was the lawsuit filed against Warner Bros. by a former writers’ assistant for the television show Friends who asserted that the use of sexually coarse and vulgar language and conduct by the show’s writers constituted sexual harassment. The Supreme Court of California in that case held that “the First Amendment protects creativity.”
The case that held greatest precedent is a matter in which a group of gay, lesbian, and bisexual Irish Americans sought to participate in Boston’s St. Patrick’s Day parade. The U.S. Supreme Court, which ultimately heard the case, ruled that it would be a violation of the First Amendment for Massachusetts to require private citizens “who organize a parade to include among the marchers a group imparting a message the organizers do not wish to convey.”
The defendants in these cases argued that they didn’t care what their employees or participants are in reality — gay, straight, male, female — but rather how they appear. “They say, ‘We are entitled to create a program that looks the way we want it to look,’” says Eugene Volokh, a professor at UCLA School of Law. And the courts have agreed with them.
MORE: The market for marketing software is accelerating rapidly
Reporting the news and creating a television show both qualify as exercises of free speech, according to Thursday’s ruling in the Scott case. Outside those realms, however, the First Amendment defense against discrimination claims doesn’t work as well. Abercrombie & Fitch (ANF), for instance, lost a bias suit filed by a Muslim employee that it fired because she refused to remove her head scarf. Abercrombie had argued that any deviation from its dress code threatened the company’s success and that the lawsuit violated its First Amendment right to commercial free speech. A federal judge in California disagreed.
“The First Amendment line is really drawn at news and entertainment,” Volokh says. The Supreme Court has found that “people who make visual imagery are allowed to control what’s in it.”