On a rainy morning this week in San Francisco, newly appointed Mozilla CEO Brendan Eich sat down for coffee with one of the people calling for his resignation. Hampton Catlin, a prominent developer of apps for the nascent Firefox OS, announced he was abandoning the platform due to Eich’s handling of the disclosure that in 2008 he donated $1,000 to the fight against same-sex marriage. California’s Proposition 8, which passed with 52 percent of the vote in 2008, made same-sex marriage illegal in California until the law was overturned by the Supreme Court. Over the course of an hour, Catlin explained the suffering that Prop. 8 caused for him and his partner, a Brit who couldn’t immigrate until marriage became legal. Catlin asked Eich for an apology. He didn’t get one.

Instead, Eich resigned as CEO and stepped down from the board of the Mozilla foundation. "Mozilla prides itself on being held to a different standard and, this past week, we didn’t live up to it," the company’s executive chairwoman, Mitchell Baker, said in a blog post today. "We know why people are hurt and angry, and they are right: it’s because we haven’t stayed true to ourselves." Suddenly Eich, who formerly served as Mozilla’s chief technical officer and previously invented the programming language JavaScript, was out of a company he co-founded in 1998. "It may be challenging for a CEO, but everyone in our community can have different beliefs about all sorts of things that may be in conflict," Eich told CNET earlier in the week. But the challenge proved greater than his leadership.

"We haven't stayed true to ourselves."

In nearly two decades working on Mozilla’s mission, Eich became known as a brilliant technician and a crusader for the open web. But after becoming Mozilla’s CEO 11 days ago, Eich became known primarily for his opposition to same-sex marriage. In an era when Jeff Bezos donates millions of dollars in support of marriage equality in Washington and Mark Zuckerberg marches in the San Francisco Pride parade, Eich stood out both for his opposition and his refusal to discuss his beliefs. His appointment sparked an extraordinarily public debate between him and the broader Mozilla community over when a CEO can claim a right to his own unpopular beliefs — and what should happen when those beliefs clash with the written values of his company.

But Eich found little public support for his argument that he could uphold Mozilla’s commitment to equality at work while funding discrimination at home. Negative reactions from employeesdevelopers, and even OKCupid began to roil Mozilla at a time when the shift to mobile devices has left its core product and revenue source, the desktop Firefox web browser, looking increasingly like a relic. The Eich controversy was distracting Mozilla from its efforts to compete in the new world, and ultimately may have even hindered the open web itself. "It’s clear that Brendan cannot lead Mozilla in this setting," Baker told Recode. "The ability to lead — particularly for the CEO — is fundamental to the role and that is not possible here."

Road to resignation

The road to Eich’s departure is filled with unlikely twists. For starters, Mozilla already fought this battle once, in 2012. That’s when Eich’s donation first became public, leading to a firestorm on Twitter. He responded with a blog post in which he took exception to being labeled a bigot, and asserted what would become a refrain when the issue resurfaced last month: that Mozillians should focus on their shared mission, and not require participants to first pass an ideological purity test. Otherwise, he wrote, "these communities will tend to splinter, and that is likely to be a net loss for everyone." The controversy quickly died down, perhaps because Eich was then merely Mozilla’s chief technical officer and not, as now, its public face. But the tension lingered.

Meanwhile, Eich’s views were rapidly growing out of step with his fellow Americans. In 2008, opposing gay marriage was a view shared by a majority of Americans. (Eich’s opposition to gay marriage was shared, in 2008, by Barack Obama.) But by 2014, views had shifted: more than half the country now supports same-sex marriage — Obama included. Few who went to the polls in 2008 would have guessed that donating to Prop. 8 would later be seen as an offense that disqualified a person from running a company. But those calling for Eich’s resignation said his financial support would affect Mozilla’s ability to attract and retain talent. It may also have had a negative effect on fundraising at the Mozilla Foundation, which operates separately from the company that makes Firefox and relies on private donations to further its advocacy of the open web.

Did Eich even want this job?

Perhaps the biggest surprise in all this is that Mozilla, an organization that employs a host of LGBT people and vocally supports same-sex marriage, came to be led by someone who donated money to stop it from happening. As Mozilla’s co-founder and CTO, Eich was hardly a dark-horse candidate for the job. But his appointment came only at the end of a protracted search that saw the board first interview and reject 25 other candidates. In an interview with VentureBeat, Eich all but said he wished he hadn’t taken the job. "I was asked to put my hat in, and at first I didn’t want to," he told the publication. "But now I’m it."

The week before Eich was announced as CEO, half the board quit. Mozilla says that two board members had long planned to leave and that the third, venture capitalist and former Mozilla CEO John Lilly, left for reasons unrelated to the Prop. 8 donation. But the departures have contributed to the impression that company is in turmoil. Eich’s departure today, which came without any news of who might step into the CEO role, will only add to that impression.

Under a threat

Mozilla declined to make Eich available for an interview. But he told CNET that if his resignation were forced, it would bode ill for Mozilla and the web. "Mozilla is under a threat here. We don’t know how big," he said. "If Mozilla cannot continue to operate according to its principles of inclusiveness, where you can work on the mission no matter what your background or other beliefs, I think we’ll probably fail." Eich suggested that Mozillians in Indonesia largely oppose same-sex marriage, and might abandon the project if they felt that their views would not be accepted in the organization. But voices in Mozilla’s home country proved louder, and more persuasive.

"A sad victory."

Catlin, for his part, called Eich’s departure "a sad victory." "He can still keep his personal beliefs, but I wanted him to recognize that we faced real issues with immigration and say that he never intended to cause people problems," Catlin wrote on his blog. "It’s heartbreaking to us that he was unwilling to say even that." Still, at the end of his post Catlin said he would return to developing apps for Firefox OS — precisely the sort of response that those calling for Eich’s ouster had hoped for.

In coming months, Mozilla’s next CEO will have to address pressing questions about its declining share of the desktop-browser market, its languishing mobile apps, and the wildly uncertain future of its mobile operating system. Those problems would have proved tricky to navigate whether Eich was CEO or not. In the meantime, the question of whether a CEO can leave his beliefs at the door when he walks into work seems to have been answered firmly in the negative. When a CEO’s values clash with the values of the company he leads, expect the company to win.

Watch now: 90 Seconds on The Verge