California public schools seem to be, on average, much worse off than non-california schools.
One obvious reason is that, relative to cost-of-living, the per-student funding is incredibly low in costal Revenue Limit[1] districts (this distinction applies to 95% of districts statewide, but only ~65% bay area).
This makes it hard to retain teachers. It is made even worse off by the fact that the wealthy school districts tend to be so small. Where I live, there is a school district with ~15 K-6 schools in it that is funded as a Revenue limit district. Less than a mile away from there are two separate districts each with only one elementary school each, and no secondary schools. Both of those schools, of course, are Basic Aid; one has per-student funding of double the larger district and the other has per-student funding of more than triple.
This doesn't explain all of it, of course. California has had to deal with more ESL students, for longer, than most other states and those students are very uneavenly distributed as well (Aforementioned school district with 15 schools has only one neighborhood school with less than 80% either hispanic or non-hispanic).
1: In california there are two ways that schools are funded. The state has a limit of around $6k per student that it will guarantee each district gets, if the property taxes cannot cover that amount. This does not include Federal funding, or state funding that is earmarked for specific purposes, so districts budgets are a bit higher than the $6k.
If school district has revenue in excess if the ~$6k limit they only get the special-purpose state funding, but can keep the excess. Thus small wealthy neighborhoods have a strong incentive to have as small a school district as possible, to increase the per-student funding there.