That is what you are implying when you say he has to make the cake without regards to his religion because it is the law. Forcing someone to perform actions against their beliefs does compromise their beliefs.
I am still waiting for proof that he must forego his religious belief to operate in the public spectrum.