Californians may think we have a system of public education. But what we really have is a state system for rationing public education.

I got a personal taste of this in the spring, when I took my five-year-old son to our local school district offices to determine his educational future. This being California, the determination was made not by a test of his abilities or an assessment of his educational needs. Instead, it was a lottery. A school administrator pulled names out of the hat to determine whether he would get one of 24 coveted spots in our elementary school’s new Mandarin language program.

The month of September, early in a fresh academic calendar, is the time of year when we hear fine speeches and noble promises about how our state and its school districts are committed to doing the very best for every child. School superintendents and politicians often point to our state constitution’s commitment to universal education, which includes a funding requirement to deliver on that commitment. But when you experience how our schools operate, you learn quickly that such lofty, sweet sentiments and guarantees are so much Fang pi (a Mandarin approximation for cow dung).

In California, when it comes down to who gets precious educational resources, schools as a matter of policy and law leave much to chance.

We do this for two reasons: scarcity and avoidance. Educational resources here are scarce—there is simply more demand for schooling than the state’s wobbly budget system can accommodate. And so we’ve come to use lotteries and formulas, so that our officials can avoid the work of deciding who deserves resources, and so that the rest of us Californians can avoid reckoning with our collective failure to support public education.

Yes, it’s true that K-14 education is the top spending item in the state budget, but there is no area in which our school spending—which remains below the national average despite recent increases— meets education needs.

By all reliable accounts, there aren’t nearly enough good, experienced teachers in our schools. The state offers only 180 days of instruction (when research suggests there should be more than 200 days and more hours of instruction), and only provides half-day kindergarten.  And the inadequacy of newer programs and schools offered by some districts in the name of educational choice only underscore the ongoing scarcity. There are simply not enough Advanced Placement classes, career-readiness programs, charters, magnets, or language immersions to meet the demand for high-quality options.

There’s little hope of trying to do more to meet those needs. California long ago decoupled school funding from educational needs. Our school funding formulas, known collectively as Prop 98, are baked into the state constitution, and are driven by tax revenues, the budget, and income growth, not academic needs. Effectively, Prop 98 guarantees only a portion—you might say a ration—of the state budget to schools. (Tellingly, that money is supplemented by a small amount—usually $1 billion or less than 2 percent of annual education funding —from the state lottery).

So in the absence of funds to meet all our students’ needs, we turn to education’s version of lotteries to allot scarce resources. State law (mirroring federal guidance) directs school districts to use a lottery system for charter school admissions once the number of pupils who want to enroll exceeds the number of spaces. Districts with magnet programs do the same. Many of these lotteries have complicated rules and exclusions, often to help kids go to schools in their own neighborhoods, keep siblings together in the same school, or to make sure campuses are diverse. L.A. Unified has a system of points to govern its lottery for magnet school placement so complicated that a cottage industry (check out “Ask a Magnet Yenta” ) has sprung up to help parents navigate it.

Of course, such lotteries are not all that fair. The winners in lotteries are more likely to be the children of parents who have the time and resources to investigate their local educational possibilities, sign their children up for the lotteries (and, in some cases, write letters or pursue strategies to help their chances).

And the lotteries raise a bigger question, now being debated in California’s courts. Does “random” allocation of educational resources really represent justice?

Earlier this summer, the California Supreme Court showed itself to be divided on the question. A 4-3 majority of justices refused to hear challenges to the state’s systems of hiring and firing public schoolteachers and funding schools. The challengers said that those systems were violating the rights of students, because they didn’t produce enough money and qualified teachers to meet the state constitution’s guarantees of education for all.  But the Supreme Court majority, in declining to hear the challenges, endorsed the position that while there might be problems with funding and teachers, these weren’t constitutional problems—because the impact of bad policies was random and arbitrary, and not felt by any particular group of students.

Mariano-Florentino “Tino” Cuellar, a young associate justice of the Supreme Court, dissented powerfully from that logic. Curtailing access to educational opportunity, the justice argued, doesn’t become justifiable simply because it’s done arbitrarily.

“Arbitrary selection has at times been considered a means of rendering a governmental decision legitimate,” he wrote. “But where an appreciable burden results—thereby infringing a fundamental right [like the right to an education]—arbitrariness seems a poor foundation on which to buttress the argument that the resulting situation is one that should not substantially concern us.”

The brilliantly cynical filmmaker Orson Welles once said,  “Nobody gets justice. People only get good luck or bad luck.” He wasn’t wrong—our parents, where and when we were born, the people we happen to meet, all influence the direction our lives take, through no fault or deed of our own.

My own son was lucky. His name was pulled 16th out of the hat, giving him a place he now enjoys in that Mandarin immersion kindergarten. His own luck will transfer to his younger brother, who is automatically eligible to join the program when he reaches kindergarten age.

But California is not as fortunate in leaning its educational system so heavily on luck. Our schools are supposed to be equalizers, helping counter the lottery of life. Instead, they are emulating it.

Joe Mathews writes the Connecting California column for Zocalo Public Square.