Here’s why Google had the right to fire that employee over his diversity memo

  • Google fired an engineer after he sent an internal memo to co-workers on Friday challenging some of the tech giant's diversity efforts.
  • There were parts of the memo that were protected by law, such as his right to communicate with fellow employees about improving working conditions.
  • But Google had a very specific reason for his termination — part of what he said could be interpreted as sexual harassment, which violated Google's code of conduct.

Comments now are pouring in over the termination on Monday of Google software engineer James Damore, who sent a memo to co-workers on Friday challenging some of the tech giant's diversity efforts, such as mentoring programs open only to people of a certain race or gender.

Gizmodo posted the memo on the internet on Saturday and it since has gone viral. The memo contained provocative statements suggesting that women were "generally" biologically, temperamentally, or motivationally less suited for positions as software engineers or tech leaders than men are. (Read 10 of the most shocking quotes from the memo.)

Many inside and outside of Google called for Damore's dismissal. Google's CEO Sundar Pichai said that Damore was fired for "advancing harmful gender stereotypes" in the memo. Google may have had the legal right to fire Damore for that reason, notwithstanding the ways some of what Damore said in his memo was legally protected.

As an initial matter, Damore almost certainly was an at-will employee (meaning, he probably doesn't have a special contract). That means that Google could terminate his employment for any reason that did not offend fundamental public policy, such as the laws against discrimination, or no cause at all.

Google had the right to fire Damore for what the company perceived to be sexually harassing behavior, even if the comments did not so alter the workplace of female Google employees that it made Damore's comments legally actionable sexual harassment. Google cited its code of conduct that prohibits behavior beyond what the law prohibits.

Here is why the areas of the law that protected some of Damore's memo may not be enough to give him legal recourse against the company.

"Damore will face a steep legal hurdle attempting to show that he was terminated because of illegal motives and not a lawful one."

First, federal labor law does, indeed, bar even non-union employers like Google from punishing an employee for communicating with fellow employees about improving working conditions. The purpose of the memo was to persuade Google to abandon certain diversity-related practices the engineer found objectionable and to convince co-workers to join his cause, or at least discuss the points he raised. But no evidence has surfaced so far that Google fired Damore for engaging in this protected activity in terminating his employment. Instead, the company cited what it considered Damore's unprotected activity in making its decision. Damore may be unable to meet his challenging burden of showing otherwise.

Second, Damore's memo was styled as a lament to "Google's Ideological Echo Chamber." Damore's comments about his perceived marginalization as a conservative in a predominantly liberal corporate culture arguably were protected by California law that prohibits employers from threatening to fire employees to get them to adopt or refrain from adopting a particular political course of action.

Google CEO Sundar Pichai recognized that when he said in his memo to employees that "we strongly support the right of Googlers to express themselves, and much of what was in that memo is fair to debate. . . ." But Damore went beyond that and that the memo contained protected speech may not have precluded Google from taking action on what was not protected. Google may be expected to assert that it fired Damore not to silence a dissenter, but to expel a harasser.

Third, the engineer complained in parts of his memo about company policies that he believes violate employment discrimination laws. Those policies include support programs limited by race or gender and promotional and hiring scoring policies that consider race and gender. It is unlawful for an employer to discipline an employee for challenging conduct that the employee reasonably believed to be discriminatory, even when a court later determines the conduct was not actually prohibited by the discrimination laws. In other words, the engineer doesn't have to be right that some of Google's diversity initiatives are unlawful, only that he reasonably believes that they are.

All of that is true, but it also is true that there is no evidence that Google terminated Damore for those aspects of his memo. In any challenge to this termination, Google's non-retaliatory motive will matter. To be more precise, it is the motive of the people who made the decision to fire Damore, not those in the company who may have other reasons potentially tainted with illegality, that will matter.

Google Vice President of Diversity, Inclusion & Governance Danielle Brown is correct that an employee has no right to engage in workplace discourse that offends anti-discrimination laws; employees may not engage in unlawful harassment under the guise of protected concerted activity or political grievances.

If that is what motivated Google is terminating Damore, the termination may not be legally actionable.

One response Google could have taken to Damore's memo was continuation of the dialogue. Google chose termination of his employment instead. Damore will face a steep legal hurdle attempting to show that he was terminated because of illegal motives and not a lawful one.

Commentary by Dan Eaton, a partner with the San Diego law firm of Seltzer Caplan McMahon Vitek, where his practice focuses on defending and advising employers. He also is a professor at the San Diego State University Fowler College of Business where he teaches classes in business ethics and employment law. Follow him on Twitter @DanEatonlaw.

For more insight from CNBC contributors, follow @CNBCopinion on Twitter.

WATCH: Swisher on the victimization of white men in Silicon Valley