Being a good CEO is simple. It means defending the beliefs of the communities you serve, even if it could hurt the company's bottom line, Chegg CEO Dan Rosensweig said Thursday.
Rosensweig is among more than 80 chief executives who have signed a letter denouncing a new North Carolina law that invalidates legal protections against the discrimination of lesbian, gay, bisexual and transgender people. The law, signed by Gov. Pat McCrory last week, has drawn the ire of mayors in New York, San Francisco and Seattle, as well as of business leaders including Apple's Tim Cook and Facebook's Mark Zuckerberg.
"Obeying the laws of the land, living up to the duties of the office and defending the Constitution is the foundation of my governorship," McCrory said. "I signed that bill because if I didn't, on April 1, the expectation of privacy of North Carolina citizens could be violated."
Similar measures framed as religious freedom laws have passed in Mississippi, Missouri and Indiana. Georgia's Gov. Nathan Deal, who faced mounting pressure from businesses over its measure, vetoed the bill earlier this week.
The backlash from business leaders isn't surprising, Rosensweig said on CNBC's "Squawk Alley."
"What CEOs are trying to do is represent their communities and their audiences and their customers," Rosensweig said. "And the fact of the matter is, when a state is legislating discrimination against any group, that shouldn't be OK."
Like other company heads, Rosensweig may have an added incentive in standing against the new law.
While his online textbook rental company does not have a local operation in North Carolina, it has found its overwhelmingly college-student customer base coming down against the law. And increasingly, Rosensweig said, he's found Chegg's customers want the company to advocate for issues beyond affordable textbook prices.
"[Students] like us to be a voice for issues that are important to them," Rosensweig said. "This is an issue that we've heard from a lot of college campuses in North Carolina that are saying, 'Thank you Chegg for signing this letter, because it doesn't represent who we are.'"
In this same vein, Mitchell Gold, co-founder of North Carolina-based Mitchell Gold + Bob Williams, told CNBC's "Closing Bell" in an interview that the greatest challenge for companies in North Carolina is recruiting creative talent. Gold, who has signed the letter, argues that employees don't want to relocate in an "exclusionary" state.
The openly gay CEO told CNBC that the "legislation is not just about business." He contends that the law is conflicting for children struggling with their sexual identities. In addition, "fundamentalist Christians just hate the idea that gays will have an equal place in the workplace; they hate the idea that two gay guys are going to be married," he said on Thursday.
Conversely, Rosensweig acknowledged that Chegg and other corporate opponents of the measure could face criticism from more conservative customers.
"The good CEOs look at the core values of their companies, and they say, 'who do you represent and what do you represent, and you go fight for these things,' " he said.
— CNBC's Denise Garcia contributed to this report.