In both cases it's a matter of being able to choose whether to participate in a message you don't agree with.
[0] https://www.nytimes.com/2018/06/04/us/politics/supreme-court...
If you can't understand why I'd imagine you're going to spend a lot of your life being extremely confused, angry and frustrated.
If the baker thinks it's a message of sin, then what? It's not like selling them a room at a hotel or any other standard thing. This is a custom crafted item and message that they are being asked to help propagate, and one that they disagree with.
https://www.nytimes.com/2018/06/04/us/politics/supreme-court...
The fact you're equating the two is actually disturbing.