The Supreme Court actually indulged in a nice bit of hair splitting in that case, distinguishing between serving a person, versus serving a ceremony. And in splitting that hair, made a decently rational and equitable precedent: while you can't deny service to an individual based on individual characteristic - say, refusing to bake a cake for a gay couple or a KKK member, you can refuse to provide service to a ceremony you don't support - i.e., a gay wedding or a KKK rally.