But nothing in the law bans discrimination based on ideology more broadly. A store can refuse to sell to someone because he’s a Nazi, or a Communist, or pro-life, or pro-choice, or pro-gay-rights, or anti-gay-rights. A store can likewise refuse to inscribe cakes with Nazi, Communist, pro-life, pro-choice, pro-gay-rights, or anti-gay-rights messages, if it’s discriminating based on the ideology of the message, rather than the religiosity of the buyer.
Here, there’s no reason to think that Azucar Bakery discriminated against Jack because of his religion, or even because of the religiosity of his message (though I don’t think discrimination based on religiosity of message is barred by the law in any event). I suspect that if the message had read “Gay is unnatural” or “Gay is disgusting” — with no reference to religion — Azucar would have refused to write that message, too. To win on a religious discrimination claim, Jack would have to prove that he would have been served based on his religion, and he can’t do that if the Azucar people credibly testify that they would have rejected such an anti-gay message regardless of whether or not it was religious. (Nor can Jack argue that this was “creed” discrimination; in such statutes, “creed” simply means “religion.”)
I do think there are serious Free Speech Clause problems with some application of public accommodation discrimination laws, such as to wedding photographers; but that is a separate matter. Here, the law simply doesn’t even purport to prohibit refusals to write messages on cakes based on the messages’ ideology.