But the baker didn't refuse to make the cake because the customer was gay.
If the customer had walked into the shop holding hands with his husband and ordered a dozen croissants the baker would have served him — and been legally compelled to do so.
You cannot legally refuse to serve somebody because of who they are or because you disagree with their lifestyle. You can refuse to make a product that promotes something that offends your conscience.
The distinction is simple and very important.