If you or I are doing a bad job, we can generally be fired. Certain procedures might have to be followed; a cause might have to be proved. But most of us work with the incentive that if we do a bad enough job, we'll be let go.

It's different for public school teachers in California (and for many teachers elsewhere). If they can manage to not utterly disgrace themselves in the first year and a half of working, they get locked in to "permanent employment" status.

If their performance later becomes so disgraceful that the "permanent employment" status could be overridden, the process of trying to firing them is so annoying, expensive, and time consuming that their bosses often don't bother. And when teachers have to be laid off for financial reasons, it doesn't matter how good they are, they'll get canned before someone who has any seniority over them, no matter how bad these other teachers are, due to the state's "last in, first out" (LIFO) rules for teachers.

These policies make it difficult and expensive to fire teachers and make the teacher body as a whole in California public schools of lower quality than it would otherwise be. Do those problems with quality and expense constitute a violation of California students' constitutional rights to an education? Court proceedings in California Superior Court in Los Angeles County, in the case of Vergara v. California, may settle that question.

Nine public school students, with the support of the educational rights activist group Students Matter (funded by optical telecommunications systems millionaire David Welch) filed suit in May 2012 against California and several of its educational agencies. As the students' lawyers stated in a court filing opposed to the defendants' (failed) motion for summary judgment, the rules they are challenging "prevent California's school districts from providing even a minimally acceptable education to some of California's most vulnerable students because they effectively prohibit school districts from prioritizing, or meaningfully considering, the interests of their students when making critical teacher employment decisions."

And this next part is important: "As a direct result…school districts are forced to place failing teachers—those who are often well known to be either unable or unwilling to perform their jobs in even a minimally satisfactory manner—in classrooms where they perform miserably year after year in teaching California's students. Students taught by these grossly ineffective teachers are missing out on half or more of the learning that students taught by average teachers receive in a school year, leaving them far behind their peers and placing the quality of the rest of their lives in jeopardy."

The student-plaintiffs range in age from eight to 17, including boys and girls, white, black, and Hispanic. Most of them expressed in declarations to the court either bad experiences with bad teachers and/or having great teachers pushed out for lack of seniority. While the plaintiffs did not choose to sue any teachers unions, two of them, the California Teachers Association (CTA) and the California Federation of Teachers, pushed their way into the case as "intervenors," claiming their interests were at stake.

In the past decade, the plaintiffs said in a press release, only 91 teachers have been successfully dismissed in the state, and most of those were for "egregious conduct," with only 19 booted for unsatisfactory educational performance. This would make California's teachers a miraculously effective and competent set of workers if the numbers reflected reality rather than their extraordinary political power. They've scuttled past attempts to institute databases that would help monitor student academic performances and link it to teachers' performances, and even attempts to make it easier to fire teachers accused of sexual abuse.

After three failed attempts to get the Vergara case killed on the part of the defendants, the trial began last week in front of Judge Rolf Michael Treu, who will decide the case without a jury. (Whichever side loses will undoubtedly appeal up to the California Supreme Court.) Among the lawyers for the students is the team that helped overthrow California's ban on same sex marriage at the federal Supreme Court in Hollingworth v. Perry, former U.S. Solicitor General Theodore Olson and Theodore Boutros.

The hiring and firing rules for teachers are a result of some unparalleled political power; while teachers unions have complained about the suit being funded by a politically interested millionaire, the CTA is the biggest, richest political force in the state, spending in the '00s more than $211 million on political giving and lobbying—nearly twice the amount of the nearest competitor in political influence, the Service Employees International Union.

Marcellus McRae, one of the trial lawyers for the students, points out that not all teachers love these rules. The plaintiff's lawyers have teachers as well as administrators on deck, and many teachers would be glad to see this case succeed in "elevating quality for teaching across the board. No one wants bad teachers."

McRae thinks there is no way the teachers' employment perks can survive the judicial scrutiny they deserve, which would require the state to prove they serve a compelling state interest and do so in the most narrowly tailored way. Given that many other states manage to have reasonably successful school systems with far looser requirements for tenure or firing bad teachers, he thinks the state can't prove California's particular policies are necessary to treat teachers fairly, retain them, or give them due process.

McRae insists they are not trying to legislate from the bench, as teachers unions have complained. "The relief we are seeking is to have the existing statutes declared unconstitutional," he says. "We are not asking courts to play the role of legislature and write solutions; those have to come about through the involvement of all the stakeholders and the legislature."

John Deasy, the superintendent of the L.A. Unified School District, has testified for the plaintiffs in the trial, lamenting an average cost of $350,000 and an occasional time period of 10 years to get rid of a crummy teacher. The result, Deasy says, does indeed damage students' ability to get an equal or quality education.

"It is my experience," he said, "that this statute does not provide for the timely dismissal of teachers who are incompetent, who are unable to teach. And that is fundamentally what protects the quality of public schools, is having highly competent, and highly effective teachers in front of students every single day." Less than 1 percent of LAUSD's workforce were either successfully fired or resigned while facing dismissal procedures during the last school year.

Troy Christmas, a director of labor strategy with the Oakland Unified School District, testified to the multiple levels of costs in getting rid of bad teachers. First the direct costs—attorneys, "full discovery, we're talking 250 interrogatories, we're talking interviews with witnesses" and all the staff and lawyer time that goes along with that. There's also the opportunity costs of all the other things the people working on that aren't doing; and "costs to the learning environment—you're asking third graders, fourth graders…to be interviewed by the district but then also interviewed by those…representing the teacher."

Various school professionals for the plaintiffs testified to the obvious bad effects of LIFO layoffs—it can't be good for the quality of remaining employees if one cannot consider employee quality in deciding who gets laid off. The students' lawyers point out that many "teacher of the year" winners get canned because of LIFO. A Harvard educational economist, Raj Chetty, who testified for the students, said he's found, not just in California, that "Seniority-based [layoffs] have a disproportionately negative impact [and it] is concentrated among minority and low-income students."

The suit argues not only that the state's teacher hiring and firing policies damage California's students as a whole, but that they have a disparate impact on minorities and the poor, whose schools tend to see the most layoffs and highest churn because of the LIFO rules—sometimes, Christmas testified, as much as 85 percent of a school's teachers go at once. The plaintiffs cite research from The Education Trust West that says that, as the plaintiffs sum up, "In the Los Angeles Unified School District, African American and Latino students are two to three times more likely to have ineffective teachers than their white and Asian peers."

Chetty's research convinces him—and has convinced many others—that California's inability to get rid of bad teachers easily and keep good ones indeed severely harms student's ability to get a good education. (The National Council on Teachers Quality in 2011 gave California teachers an overall grade of D+.)

"If a child is assigned to a highly effective teacher as measured by their impacts on test scores," Chetty testified, " it's not merely that that teacher is effective at teaching to the test and raising student's performance on tests, but also that that teacher has longer term impacts on outcomes we ultimately care about apart from education. Like attending college, like earnings, like teen age pregnancy." A student's chances of attending college can be substantially reduced by years of ineffective teachers.

An interesting counter came in a deposition in the case from Jane Robb of the CTA, who said she did not agree that "the most effective factor in student learning is the quality of their teacher." It is an interesting tack for teachers to take—they should have this extreme level of job protection because it doesn't matter that much to students if they are any good or not—but it might be the best argument they have.

It took a while for this issue of teacher job security to get before the courts, after years of failure in the political realm and the recent vetoing by Gov. Jerry Brown of a teachers-union-backed reform bill that, according to San Francisco Unified School District Superintendent Richard Carranza testifying before the Senate Committee on Education, would make "a convoluted, costly and time-consuming process…even worse."

Education Week reports that no one has ever succeeded in overturning teacher work rules for violating a constitutional right to an equitable education, though Boutros told them that "Even though we're focused on California constitutional provisions, we think it could provide a model for challenging the laws of other states that have the same arbitrary, unequal effects on rights of students." The New York Times noted that "Many school superintendents and advocates across the country call [such strong teacher retention rules] detrimental and anachronistic, and have pressed for the past decade for changes, with mixed success. Tenure for teachers has been eliminated in three states and in Washington, D.C., and a handful of states prohibit seniority as a factor in teacher layoffs."

Kate Elliott, one of the plaintiffs, is a high school senior in San Carlos. "I had a really bad experience with an ineffective teacher in middle school," she says. "It was frustrating to go to class every day doing things like watching YouTube videos and coloring" instead of learning the science she should have been taught. People around school know she's involved in this suit, and she says "most people are interested and very positive about my involvement." Even teachers, she says, "think it's definitely important they have colleagues who want to teach well, and support quality education across the board."

The teachers unions, though, want to push the problems with California education off on other causes; as a CTA spokesman, Frank Wells, said, reported in L.A. School Report, "we do see this as an opportunity to show that teachers and laws that protect basic due process, fairness, and the right for employees to be heard are not the problem with California schools. This lawsuit does nothing to address poverty, other social issues, and ongoing lack of social and capital investment in a strong public school system."

No, it doesn't. But it might prevent students like the plaintiffs from seeing their chances in life harmed in order to keep someone in a job that they aren't very good at.