As a California employee, your employment may be terminated at the will of either party on notice to the other, unless your employment has a specified term. (Labor Code § 2922). That not only means that you are free to quit your job for any reason, but that your employer may lawfully fire you for no reason, or for an arbitrary or irrational reason.
However, California courts recognize a narrow exception to this rule: there can be no right to terminate for an unlawful reason or a purpose that contravenes fundamental public policy. Your employer can’t take any adverse employment action, such as demotion or suspension without pay, for a reason that violates public policy.