Doesn't matter whether the bakery is Muslim or Christian or atheists- the business has to follow business law- and if it is illegal to discriminate based upon sexual orientation in your state- it is illegal. If not- it isn't.
That depends on if courts find the 1st Amendment or PA laws (for behaviors, remember, not race) dominant. That test will come. Place your bets..
Public Accommodation laws have been in place since 1964
Civil Rights Act of 1964: Public Accommodation
SEC. 201. (a) All persons shall be entitled to the full and equal enjoyment of the goods, services, facilities, and privileges, advantages, and accommodations of any place of public accommodation, as defined in this section, without discrimination or segregation on the ground of race, color, religion, or national origin.
Note- from the beginning of Public Accommodation laws, behavior- noted in red- has been among discriminatory reasons- along with race- for prohibiting refusal of service