Businesses provide services to the public. They are the manner in which resources are largely distributed and are in that regard no different from state agencies who provide services. If businesses are allowed to selectively deny their services, parts of the public can be stripped of access to society, this is something we've already all agreed should probably not be allowed to happen.
If you make cakes, you have to offer them to everybody. If you don't make cakes, you don't have to offer them to anybody. Nobody has to take what you offer and nobody can force you to offer something that you don't offer to anybody. That's the line.
It's not completely cut and dry, because there are valid reasons to deny service. Lack of shirt is a popular one, but even just "causing a scene" or "disturbing other customers" (not sure how those work legally, but it's clearly a thing).
Those reasons aren't the same as skin color, gender, sexuality, or other things people can't choose.
The obvious problem is that it's easy to find a valid excuse to refuse service. The cake incident wasn't about that cake, it was about setting a legal precedent about whether such discrimination ought to be legal or not. Which does matter, even if smart discriminators will work around it. The legal status affects public perception, un-normalizes the behavior. And the kind of people willing to put discrimination before profit often take too much pride to hide it.
Even if the baker claims to be out of sugar or whatever, it's at least a step forward from "No, because your love is fake, sinner." It's easier to discriminate when you can do it casually and openly, otherwise it might start feeling wrong or something.