Employers are legally allowed to show favoritism at work. Generally, employers do not have to treat all employees fairly or the same. For example, a supervisor can favor one employee over others because the supervisor is friends with or gets along better with the favored employee.
However, an employer cannot treat an unfavored employee worse than the favored employee specifically because the unfavored employee is a member of a protected class. That would be unlawful discrimination. Some of those protected class characteristics are race, color, ethnicity, nationality, age over 40, sex, gender, military service, disability, medical condition, religion, or sexual orientation. The confusing part about this analysis is that we are all technically members of many protected classes even though people often view only minorities as potential victims of unlawful discrimination. For example, both White and Black are protected classes. Thus, both a White or Black person can be victims of unlawful racial discrimination, even if the discrimination is perpetrated by a person of the same race as the victim.
It may be a good idea for an employee to discuss or report concerns about illegal discrimination and retaliation in emails to HR or management and provide concrete examples, if available.
Government Code Section 12940