California has a preemption clause, which reserves the authority to regulate firearms to the state alone. Some cities have violated it in the past.
Exactly and that's why the state judge was wise (and I believe motivated) to finish it in state court rather than have the 9th screw up and ok the ban moving it to SCOTUS and a possible groundbreaking SCOTUS ruling on the individual right.