FEHA is the key law governing work discrimination in California. It prohibits companies from firing staff as they are a member of the safeguarded class.
there are lots of other situation that will change the statute https://jmllaw.com/areas-of-practice/employment-law/wrongful-termination.shtml