That's not entirely correct. California makes it illegal for an _employer_ to discriminate against an _employee_ based on their political views. It does not make it illegal for businesses to discriminate against _customers_ based on their political views.