I think the judge figured that their definition of sinful wedding unfairly singled out gays.
It was more that that. And note that at the time this happened Colorado did not allow or recognize gay marriage, and the Supreme Court had not made its major ruling. In fact, when their "conscience" got stretched, the bakers happily trotted the former into court.
The bakers stated that they did not make cakes for weddings by gays, and in court proceedings they confirmed that as their position. They then went on to argue that their refusal had nothing to do with sexual orientation; they just didn't care for gays getting married. That's a funny one to try and sell.
In addition to the original decision, here is how the appellate court, somewhat dryly, put it:
The courts also pointed out a couple of things, which are significant for those who wish to argue that by baking the cake the bakers would somehow be supporting or approving or participating in whatever:
(a) First, as a matter of simple common sense, people do not think that those who supply materials for weddings and suchlike are "supporting or approving or participating". Not those involved in the marriage or even those merely attending. People see it as no more than a business transaction.
(b) Second, if the bakers have their doubts in regard to (a), then what they can do is put up signs and so forth stating that by supplying cakes they are not necessarily "supporting or approving or participating".
Finally a note to those who do not wish to see such cases connected to the struggle by blacks for rights: The courts which finally acted in regard to that struggle see it differently and have repeatedly made the connection clear. In the bakers' case, the appellate court cited this from 1964:
Undoubtedly defendant . . . has a constitutional right to espouse the religious beliefs of his own choosing, however, he does not have the absolute right to exercise and practice such beliefs in utter disregard of the clear constitutional rights of other citizens. This Court refuses to lend credence or support to his position that he has a constitutional right to refuse to serve members of the Negro race in his business establishment upon the ground that to do so would violate his sacred religious beliefs.
A major issue in the discussion of these cases has to do with the fact that quite a few people do not understand "public accommodation laws" and seem to think that "if it's their labour or their business or whatever, then they may freely indulge in unlawful discrimination". Not so.