Washington (CNN) Religion didn't come up when Jack Phillips, a Christian baker in Colorado, told a gay couple he wouldn't make their wedding cake in the summer of 2012. Shaken and embarrassed, Charlie Craig and David Mullins say they quickly left the shop without seeking an explanation.

But Craig's mother, Debbie Munn, had been with the couple and wanted to know why Phillips had refused their business. She called him first thing the next morning.

"He shared his faith, and I shared mine," said Munn, who attends a nondenominational church in Wyoming. "Within a minute I knew there was nothing more to be said."

After five years of litigation, the dispute between the gay couple and Christian baker reached the Supreme Court on Tuesday. But while lawyers debated the legal issues in Masterpiece Cakeshop v. Colorado Civil Rights Commission, a different set questions could be asked about the conversation between Phillips and Munn.

Mainly, what is it about religion that makes it such a conversation-ender?

In the last few years, moral psychologists have tried to explain why good people can be so bitterly divided by politics and religion, to paraphrase the subtitle of one popular book . Are religious beliefs so deeply held that they brook no dissent? Or, as some psychologists have argued, does faith include a healthy dose of self-interest masquerading as morality?

Religion is more than a source of conflict, of course. Faith offers solace and a sense of solidarity for billions around the world. But this week, the combative side of religion was hard to escape, whether you were in Washington, Tuscaloosa or Tel Aviv.

In Alabama, Republican Senate candidate Roy Moore tried to rally conservative Christians by casting his opponents as "socialists" who "put man above God." Stumping for Moore, Steve Bannon, a former adviser to President Donald Trump, said Mitt Romney "hid behind (his) religion" when he served as a Mormon missionary rather than enter the draft for the Vietnam War. Romney had criticized Republicans for backing Moore despite allegations that Moore had harassed and molested teenaged girls when he was in his 30s. Moore has denied the allegations.

On the world stage, Trump announced that the United States would recognize Jerusalem as Israel's capital, inciting a potent mix of emotions among Jews, Christians and Muslims. Some splits erupted within religious communities themselves, pitting Christian against Christian, and Jew against Jew.

The Masterpiece Cakeshop case is not nearly as incendiary as Jerusalem's status, but it poses similar questions about religious groups' willingness to compromise on deeply held principles.

If the scene outside the Supreme Court on Tuesday was any indication, the answer seemed doubtful.

On one side stood about 100 protesters who listened to conservative speakers quote the Bible and rail against the "secular establishment." They chanted "We back Jack!" and waved signs that said "Free Speech Should be a Piece of Cake." A musical group called the "Free the Cake Baker Squad" played a ditty called "Cakey Breaky Heart" on acoustic guitars.

Twenty yards away stood another group, also of about 100 people, who listened to liberal speakers, some of whom also quoted the Bible and railed against bigotry and discrimination. They held posters saying "It's Not About the Cake" and danced to Curtis Mayfield's soul classic "Move On Up."

Both sides accused the other of intolerance, of trying to impose their moral views on the rest of the country.

For a while, a man stood between the two groups of protesters, calmly holding a large umbrella that read, "Bow to Jesus. Repent America. Time is Running Out."

'Jesus talked about Sodom'

The Rev. Raedorah Stewart stood with the protesters backing the gay couple. She wore lavender glasses to match her purple vestments and described herself as a queer woman in her 60s. She's also the faculty director of the Writing Center at Wesley Theological Seminary and a minister at Covenant Baptist United Church of Christ in Washington.

Stewart said she has experienced bigotry because of her race and sexuality. She was skeptical about finding middle ground with the conservative protesters.

"There is no compromise in determining who is human and deserves justice. I would not seek to persuade them other than to say, 'You are made in the image of God, and I am made in the image of God, and we are both entitled to equal rights.'"

Stewart said she also has encountered suspicion from LGBT people who are skeptical about religious believers, especially ministers. "Sometimes they don't see me as a queer person," she said, "even though am I no Bible-thumper."

What would Stewart do if she had a business and white supremacists wanted her to make a sign for their rally, an analogy some conservatives have made to Phillips' cake shop?

"I would make the sign, I would take their money, and I would use it to support my ministry."

The Rev. Glen Bayly, a retired minister in the Christian & Missionary Alliance, an evangelical denomination, stood with the conservative protesters, holding a sign supporting Jack Phillips. Bayly lives in Mifflinburg, Pennsylvania, where he hosts a radio show called "The Lion's Den University Report" about Christians' experiences -- often negative, as the biblical title alludes -- at secular universities.

Like Stewart, Bayly was skeptical about compromising with protesters on the other side.

"Of course they are offended when you're saying that their lifestyle is sinful, but that's where the conversation has to start."

Bayly said the dividing line between liberals and conservatives is the Bible, which he believes clearly prohibits homosexuality. "Jesus talked about Sodom and the Day of Judgment," he said, citing a passage from the Gospel of Matthew

Gesturing at the Supreme Court, he continued, "No matter what happens today, those justices are not the supreme judge. God is the supreme judge."

What about Stewart's argument that all humans are made in the image and likeness of God and should therefore be treated equally?

"They're talking about equality over there a lot," he said. "That's a spiritual concept. It doesn't mean we're all alike in every way. Some of us are taller, some are shorter, some are murderers. We make value judgments every day."

While neither Stewart nor Bayly saw much room for political compromise, they did believe in personal -- if not political -- conversions.

Stewart said her mother, an avid Bible-reader, was generally accepting of her sexuality and her calling as a minister, but she was concerned about her daughter's salvation. "She told me that she worried that I would preach others into heaven, but I would go to hell."

Over time, though, Stewart said her mother's theology changed, and she moved from a conservative Baptist church to Stewart's Covenant Baptist UCC, which calls itself a "radically inclusive" congregation.

"Do I hold out hope for more change? Yes. What transforms is love."

Bayly's conversion story moved in the opposite direction. He was handing out tracts titled, "I Was 'Gay': The Testimony of Stephen Bennett."

In the tract, Bennett, who Bayly said was a friend of his, describes an emotional and sometimes painful path from homosexuality to heterosexual marriage. Through praying and reading the Bible with Christian friends, Bennett writes, he slowly made his way to the "God-ordained path of heterosexuality."

"My story is a dream come true," Bennett says in the tract. "I no longer struggle whatsoever with homosexual thoughts, feelings or actions. I am a heterosexual man through and through, the exact way God created me to be."

Bayly said he tried to hand out the tract to some of the LGBT protesters who wandered over to the conservative side. He didn't find many takers.

'Goodies and power'

Several years ago, researchers conducted a study to see if self-interest could change people's moral views. In three experiments, participants played a game in which they were paid money based on the principles of equality (everybody gets the same amount) or equity (the payouts are determined by how hard one works).

The participants given less work said it was more moral to divide the money equally among everyone. Those assigned more work said the opposite, that equity was the proper principle to follow. The study also found that people quickly changed their position depending on whether they stood to benefit.

"In the few minutes between reading the game instructions and discovering their own role -- and hence, where their interests lie -- people's reported moral judgments changed in line with their self-interest," the researchers wrote.

Moral psychology is a complex discipline, and scholars acknowledge that ideology plays an important role. But some argue that studies like these indicate that beliefs are just one factor in people's moral decisions, which are more fluid than we think.

"What we think are bedrock principles are not really bedrocks," said Robert Kurzban, a professor of psychology at the University of Pennsylvania and one of the researchers behind the equality-equity game. "As situations change, people have different perceptions, and they measure the costs and benefits of holding moral commitments."

Consider white evangelicals' willingness to support politicians who act immorally in their personal lives, Kurzban said. In 2011, just 30% said they would do so , but in 2016, when Donald Trump became the GOP presidential nominee, that number leapt to 72%.

"You have to ask, were their answers in 2011 suspect, or did their interests change because they wanted this guy who would give them goodies and power?" said Kurzban, co-author of the book "The Hidden Agenda of the Political Mind: How Self-Interest Shapes Our Opinions and Why We Won't Admit It."

Evangelicals might argue -- and many have -- that the desire for "goodies and power" was driven by their beliefs that abortion is immoral and religious freedom should be protected, positions advocated by Trump.

But it's also possible to see religious freedom concerns as driven by self-interest -- the right to practice one's faith without state interference, Kurzban said. In fact, it's possible to see both sides of the Masterpiece Cakeshop case as self-interested.

LGBT people have obvious reasons to protest state-sanctioned discrimination, which, in addition to causing emotional distress, limits their ability to buy goods, get medical care and participate as full members of society. Conservative Christians, in addition to their principles, also have self-interests to protect, including the ability to act on those principles without being forced out of business.

So maybe it's not the bedrock beliefs espoused by protesters like Stewart and Bayly that make the Masterpiece Cakeshop case so difficult to decide. Maybe it's the Solomonic, split-the-baby task of determining whose self-interests should win out. It seems like a zero-sum game, inflamed by the partisanship that makes small compromises seem like big defeats. You can see that in Roy Moore's candidacy, the battle over the Holy Land, and any number of religious hot spots around the world.

"Religion seems to present insoluble problems," Kurzban said. "But it's not because of religion. You have to look behind that, and think about the real, tangible things at stake."