“Can anyone explain to me how this is legal? “
You can choose not to go there.
But what if I choose to go there?
Why should I be denied service because of my religious beliefs?
As the Beastie Boys once said:
‘Fight for your Right to Party’
Bake the damn cake.