Meaning two supreme courts did recognize that two different bakeries had a valid objection to providing special cakes for homosexual marriage because of what they represented to the baker. Whether that validated their discrimination is the issue.
In the first case (which invoked the second) the problem was because of what cake conveyed by writing, and which in the second the problem was because of what was conveyed by consenting to create and provide the custom cake for the purpose intended for it. Unless you reject the latter means of conveyance, the objection is in essence that same as the conveyance by writing. And SCOTUS saw this dismissal as a problem, and recognized that,
"To Phillips, his claim that using his artistic skills to make an expressive statement, a wedding endorsement in his own voice and of his own creation,
has a significant First Amendment speech component and implicates his deep and sincere religious beliefs.
Rather than dismissing that Phillip's had a legit religious objection in arguing he was using his artistic skills to make an expressive statement, thus endorsing what he used them for, SCOTUS condemns the CO commission for essentially doing just that, esp. with its hostility and inconsistency:"
As the record shows, some of the commissioners at the Commission's formal, public hearings endorsed the view that religious beliefs cannot legitimately be carried into the public sphere or commercial domain, disparaged Phillips' faith as despicable and characterized it as
merely rhetorical, and compared his invocation of his sincerely held religious beliefs to defenses of slavery and the Holocaust.
The Commission ruled against Phillips in part on
the theory that any message on the requested wedding cake would be attributed to the customer, not to the baker. Yet the Division did not address this point in any of the cases involving requests for cakes depicting anti-gay marriage symbolism [which CO held as valid denials].
The Division also considered that each bakery was willing to sell other products to the prospective customers, but the Commission found Phillips' willingness to do the same irrelevant.
The government, consistent with the Constitution's guarantee of free exercise, cannot impose regulations that are hostile to the religious beliefs of affected citizens and cannot act in a manner that
passes judgment upon or presupposes the illegitimacy of religious beliefs and practices. -
https://www.supremecourt.gov/opinions/17pdf/16-111_j4el.pdf (emp. mine)