How do you win in California? Lose big first.

That’s a very old bit of wisdom in a state founded by people who abandoned their homes and families to move here and fail to get rich in the Gold Rush. But this lesson has been given fresh context by a new book (Jo Becker’s Forcing the Spring) and a new documentary film (The Case Against 8, which opened in theaters last week) that provide behind-the-scenes accounts of the successful effort to invalidate Proposition 8, California’s ban on same-sex marriage.

The passage of Prop 8 in 2008 was a huge defeat for advocates of marriage equality, and, in its aftermath, it seemed prudent to pull back and wait for years before seeking to overturn the decision. But a small group of political consultants, Hollywood players like Rob Reiner, and lawyers (among them Ted Olson and David Boies) grasped that Prop 8, while a loss, was a strange sort of gift to their cause. Instead of cowering in the face of a voter verdict against marriage equality, they chose to show how a popular vote against the rights of gay couples was itself evidence that such couples faced discrimination and needed the protection of the courts. As one member of the legal team challenging Prop 8 tells Becker in her book, “The other side is going to pound the table and say, ‘The people have spoken! The people have spoken!’ And we’re going to say, ‘Yeah, that’s part of the problem.’”

It took less than five years for a U.S. Supreme Court ruling last spring to effectively overturn Prop 8—and in that time, thanks in no small part to the 2008 loss, public opinion shifted in favor of same-sex marriage both in California and across the country.

One might think that in California, with our long history of succeeding in the face of spectacular failures, another story of using defeat in service of triumph would draw a ho-hum reaction. But the film and especially the book have come under hot attack from liberals who say the team challenging Prop 8 was reckless and glory-seeking, and should not have been so quick to take on the initiative.

I find such criticism depressing, because the impatience of the Prop 8 challengers is precisely what California needs. Unfortunately, as the state has grown older and less dynamic, Californians and their leaders have become a cautious lot. Despite their deep concern about the state’s persistent problems in schools and taxes and budgeting and prison, Californians consistently tell pollsters they have little stomach for big changes.

It’s as though we’ve forgotten our past. Throughout California history, we have prospered by accepting the ill, the war-damaged, the politically persecuted, the poor—embracing the world’s losers (starting with those 19th-century prospectors)—and building the schools and infrastructure to give them a second chance. After all, this is a state that all but pioneered legalized discrimination against immigrants—who nonetheless flocked here and built California into one of the most prosperous and welcoming places on earth.

Our signature industries were built on failure. We became an early-20th-century oil giant because of men like Edward Doheny, who had experienced business losses and learned hard lessons before coming to California. Our aerospace and defense industry prospered from the terrible human loss of wars, and cleverly remade itself for growth even in times of peace. Silicon Valley, the land of the failed start-up, has built the current Internet explosion on the hard lessons of the late-’90s tech bubble. Some of today’s richest Californians made their fortunes by investing during some of our worst real estate busts.

And no one knows how to do bombs like the good folks in Hollywood, a place full of unprofitable movies and rich people. Ask yourself: How many rom-com Hiroshimas did Matthew McConaughey drop on the movie-going public before he finally figured out how to make Oscar gold?

This success-from-failure pattern runs even deeper in California politics. The current California Constitution was produced in 1879 after three decades of failed attempts to call a convention. The victory of an egregious 1964 ballot measure blocking fair housing legislation was overturned in court, then went on to inspire a stronger fight against housing discrimination. Proposition 13 was Howard Jarvis’ third try at a game-changing tax measure; two previous attempts blew up, defeats from which he learned and drew strength. The celebrated political reforms of redistricting and the open primary have a similar history—success arriving only after big defeats.

Certainly, it would be nice if making progress in California didn’t require getting kicked in the head first, but that’s not our pattern. Of course, it’s not just the big defeat that’s essential to victory; it’s having the right attitude about that defeat.

The successful challengers to Prop 8 couldn’t be sure of victory. But as Forcing the Spring and The Case Against 8 show, they shaped their legal fight to educate the public so that even a defeat would win hearts and minds. And they capitalized on setbacks along the way. When the U.S. Supreme Court barred broadcasts of the federal court hearings on Prop 8 in San Francisco, they made a virtue of the blackout, stepping up Internet coverage of the case and even encouraging a famous screenwriter to produce a play of the proceedings.

Indeed, the very existence of the new book and film about Prop 8 show the virtues of the big loss. Prop 8 is a dead letter, but it’s still being used to advance its opponents’ cause.

This may be the bloody secret of success in this beautiful and brutish place. You gotta get out there and get clubbed over the head. And then you gotta grab that club and never stop hitting back.

Originally published in Zocalo Pubic Square.