The nonprofit that makes the Firefox browser infuriated many employees and users last week by naming Eich head of the Mountain View, Calif.-based organization.

At issue was Eich’s $1,000 donation in 2008 to the campaign to pass California’s Proposition 8, a constitutional amendment that outlawed same-sex marriages. The ban was overturned last year when the U.S. Supreme Court left in place a lower-court ruling striking down the ballot measure.

Eich’s contribution had drawn negative attention in the past but took on more weight when he was named CEO. Mozilla employees and users criticized the move on Twitter and elsewhere online. Earlier this week, dating website OKCupid replaced its usual homepage for users logging in with Firefox with a note suggesting they not use Mozilla’s software to access the site.

The departure raises questions about how far corporate leaders are allowed to go in expressing their political views.

“CEOs often use their station to push for certain viewpoints and get some muscle for those viewpoints,” said UCLA management professor Samuel Culbert. “But if you are going to play the game you have to think of both sides.”

Company leaders have to be conscious of what impact their own views may have on the success of their organization, Culbert argues. While some leaders, such as Starbucks Corp. head Howard Schultz, have been outspoken in their political positions, it is often in a vein that is line with the ethos of his company. Culbert said that taking a position that is divisive can both drive away customers and hurt employee morale.

The onus is also on the corporation and its board to assess whether anything that a candidate has done or said in the past will adversely affect the company’s reputation, said Microsoft Corp. Chairman John Thompson, who led a five-month search that culminated in Microsoft hiring Satya Nadella as its new CEO in February.

“When you run a public company or any visible organization, what you think and what you say is always going to affect the company,” said Thompson, “You have to be mindful of how things you do and say will affect your customers, your employees and your investors.”

Eich said in a statement Thursday that Mozilla’s mission is “bigger than any one of us, and under the present circumstances, I cannot be an effective leader.”

His resignation represents an about-face from his confident and sometimes defiant remarks in an interview published earlier this week by the technology news service Cnet. Insisting that he was best choice to be CEO, Eich told Cnet that it would send the wrong message if he were to resign or apologize for his support of Prop. 8.

“I don’t think it’s good for my integrity or Mozilla’s integrity to be pressured into changing a position,” Eich said. “If Mozilla became more exclusive and required more litmus tests, I think that would be a mistake that would lead to a much smaller Mozilla, a much more fragmented Mozilla.”

At another point, Eich said that attacks on his beliefs represented a threat to Mozilla’s survival. “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,” he said.

Mozilla chairwoman Mitchell Baker apologized for the company’s actions in an open letter online Thursday, saying that Eich is stepping down for the company’s sake.

“We didn’t act like you’d expect Mozilla to act. We didn’t move fast enough to engage with people once the controversy started. We’re sorry. We must do better,” Baker wrote.

She said that Mozilla believes both in equality and freedom of speech and that “figuring out how to stand for both at the same time can be hard.”