If you're just baking a cake for a friend, you can choose to do it or not, based on any reason that seems right to you.
If you take advantage of state and federal laws to open a bakery open to the public, then you have an obligation to serve the whole public, without discrimination. This is a well-established principle of American law. As several folks have pointed out, this is not a new issue.
In the past, businesses claimed the right not to hire or serve Jews or Catholics. In the Southwest, stores and restaurants sometimes posted signs like "No Dogs or Mexicans Allowed." Others banned Filipinos or Chinese. We all know about the "Jim Crow" practice in the South of excluding black people.
Very often, the people and businesses seeking to discriminate used a religious cover to justify their bigotry. Lots of Southern bigots claimed their religion commanded separation of the races. It's not new that a bigot today would do the same thing.
The federal Civil Rights Act of 1964 banned racial discrimination in public accommodations. That didn't sit well with the owner of Ollie's Barbecue in Birmingham Alabama. That restaurant wouldn't admit black customers to the restaurant. Black customers could only place takeout orders through a service window in the alley behind the restaurant.
Ollie, the owner, sued the United States, claiming that the Civil Rights Act violated his right to discriminate racially. Ollie lost at the US Supreme Court in a 9-0 decision. The Supreme Court gave him the bad news: It didn't matter why Ollie wanted to discriminate in the operation of his business. If he wanted to be open to the public, Ollie had to serve the whole public, without discrimination.
States like Colorado and my state California have enacted laws prohibiting discrimination against LGBT folks in the operation of businesses open to the public. Nobody has to agree with those laws. But everybody has to obey them.
You can read the story of Ollie's Barbecue here:
50 years ago, the U.S. Supreme Court ruled against Ollie's Barbecue, a landmark in desegregationby Greg Garrison
AL.com
February 21, 2015.
http://www.al.com/living/index.ssf/2014/12/50_years_ago_the_supreme_court.html"On July 31, 1964, Ollie's Barbecue filed a lawsuit challenging the constitutionality of the Civil Rights Act, which was signed into law by President Lyndon B. Johnson on July 2, 1964. Restaurants in Birmingham rallied behind Ollie's, hoping to protect their Jim Crow practice of refusing sit-down service to black customers.
"That led to a landmark U.S. Supreme Court decision handed down 50 years ago, on Dec. 14, 1964.
* * *
"The Supreme Court heard oral arguments on Oct. 5 and ruled 9-0 against Ollie's on Dec. 14. The case was officially called Katzenbach v. McClung. Also on Dec. 14, 1964, the Supreme Court ruled in Heart of Atlanta Motel Inc. v. U.S., which upheld the desegregation of hotels."