Ah, okay. I see the distinction you're making. But no, this is different in a few ways.
First, this is basically "don't ask don't tell" all over again, right? By your framing you could argue that the US Army didn't discriminate against gay people because gay people could join the army as long as they hid the fact that they were gay.
Similarly, a gay couple could probably get a cake made at one of these shops as long as they hid the fact that it was for a gay ceremony. Perhaps if they ordered two sets of bride/groom figurines for the cake and threw the superfluous ones away.
But this misses the question underpinning discrimination laws, namely, does everybody have the right to be treated the same, regardless of the specifics of who they are?
The muslim drivers are refusing service to 100% of people who openly carry alcohol. And all those people have to do to receive exactly the same treatment as everybody else is put it in a bag. Open-carrying alcohol is not fundamental to who anybody is. Nobody came out of the womb with an un-bagged bottle of Hennessy in their hand.
But there's nothing a gay couple can do to receive exactly the same treatment as a straight couple when they ask for a wedding cake. And more to the point, it's not just about marriage. Can you honestly say you think they'd be able to get an anniversary cake? Or a thank you cake from their kids to "Daddy and Daddy"? Or any cake that acknowledges the reality of their sexuality?
Their relationship is cental to many of the things that happen in their lives. And in each case, if they want to be open about it, the need to hide it or they'll be denied service.
We can quibble about the extent to which this is denial of a specific service rather than a denial of their right to be who they are, but then you have to answer the difficult question of where the switchover from one to the other lies. 10% of occasions? 20%? 50%?
I think it's best to place it at 0%. Both because I think it's the right thing to do. And because I don't see any functional way of avoiding this slippery slope otherwise. Do you?