We make all kinds of exceptions for following the public laws to allow for freedom of religion, like the Amish don't have to send their kids to public schools. The Quakers don't have to wield a weapon if they are drafted into the military. Scientologists can opt out of standard medical treatment like blood transfusions. Christian innkeepers do not have to rent out rooms to unmarried couples. Following the law is not some magic wand you can wave to prevent people from having and practicing beliefs you don't agree with.