In essence, teachers aren't working >30 hr a week. They get 2 weeks winter break, 1 week spring break, ~2.5 month summer, most every Monday holiday off. So they work about 9 months a year.
On top of that, they receive the amazing lifetime CA Pension which is like 90% of your top 5 earning years.
I looked up my teacher's salaries from high school. They make more than my CA public university STEM professors make.
About 5 years into teaching, a high school teacher will make about 60k/year regular + 25k/year in benefits. Tenured will make 120k+ in base and benefits. That is pretty good for an average of 25 hour workweek, 9 months a year.
Nothing stopping them getting another job that works between the hours of 3-10pm during the school year, putting them closer to the hours a GS analyst would work.