Last Monday, the U.S. Supreme Court narrowly sided with a bakery that refused to sell Dave Mullins and Charlie Craig a cake for their wedding reception, citing concerns that its owner's religious beliefs hadn't gotten a fair shake from the Colorado Civil Rights Commission.

Missing almost entirely from the opinion was any discussion of the legal question that had been expected to dominate it. Which was that the bakery's claim that it has the right to violate Colorado's law against discrimination because the bakery's custom wedding cakes are a form of art protected, it said, by the First Amendment.

Free speech is a vital shield against government censorship and political orthodoxy. In ruling for the bakery, the court could have warped that freedom into a license to ignore the basic laws that have long governed businesses open to the public. But it did no such thing, giving short shrift to the notion that vendors of even the most artistic cakes are entitled to special protections.

That makes the decision a victory for the First Amendment, not the bakery.

The bakery admitted that it won't serve same-sex couples who seek wedding cakes. But, backed by the Trump administration, it argued that it has a free speech right not to do so, even though refusing would violate Colorado's longstanding equality law.

The ACLU is second to none in defending free speech. But discriminating against customers when selling a product - artistic or not - has nothing to do with the freedoms the First Amendment protects.

Colorado's Anti-Discrimination Act, first enacted in 1885 to prohibit discrimination against newly emancipated slaves, promises to all in Colorado the freedom to participate in the public market on equal footing. Colorado chose to extend that freedom to LGBT people a decade ago.

As one legislator noted, updating the law was necessary so that LGBT people, too, might "live in dignity" and "die in dignity" in Colorado.

That venerable goal does not offend the First Amendment. The Free Speech Clause bars the government from burdening, suppressing, or compelling protected expression, particularly when based on favoritism or hostility to the message expressed.

It does not block laws that target non-expressive conduct, like enforcing antitrust laws or preventing businesses from discriminating against their customers.

Consider a greeting card company, a business that produces and sells speech itself. The government could not tell a greeting card company what designs to use. That would impermissibly dictate the content of the company's speech. On the other hand, the government is free to regulate other aspects of the company's operations, even though it is in the business of speech. It may require the company not to hire child workers in violation of labor laws, for example.

The same is true when it comes to commercial bakeries. The Anti-Discrimination Act doesn't require bakeries to sell any particular product or to decorate its cakes in any particular way - and it might run into constitutional problems if it did.

But if a bakery chooses to sell a particular product, including wedding cakes, it has no First Amendment right to deny service to a customer wanting to buy that product based on that customer's race, religion, or sexual orientation.

The bakery's attempt to use free speech as a cloak for discrimination fails for an additional reason: It refused to sell any cake at all for Dave and Charlie, not just an artistic one. It refused to sell even cupcakes for a lesbian couple's commitment ceremony. Its refusal wasn't about artistry at all. It was about who Dave and Charlie are - a same-sex couple.

At bottom, the bakery's "First Amendment" defense is really a quarrel with this basic conclusion. It insists it didn't discriminate against Dave and Charlie at all because, it says, it objects to events (the weddings of same-sex couples), not people (the same-sex couples themselves). That's a distinction without a difference.

A bakery that refused to provide wedding cakes for Jewish couples would be discriminating based on their religion, even if it said the reason was its objection to "Jewish weddings." If a business needs to know who the product is for in order to decide whether or not to sell it, that's an objection to the who, not the what.

When a business open to the public refuses to serve a customer because of who they love, that's identity-based discrimination, and it's not protected by the First Amendment.

It's deeply disappointing that the discrimination Dave and Charlie experienced went uncorrected. But the real takeaway from the court's opinion is this, "Our society has come to the recognition that gay persons and gay couples cannot be treated as social outcasts or as inferior in dignity and worth.

For that reason the laws and the Constitution can, and in some instances must, protect them in the exercise of their civil rights." That's what Masterpiece Cakeshop will ultimately be remembered for.

Ria Tabacco Mar is a senior staff attorney with the ACLU's LGBT project. Brian Hauss is a staff attorney with the ACLU's Speech, Privacy, and Technology Project.