For the past four months, California state Sen. Scott Wiener has been on a quest to strip his staunchly left-wing hometown of its power to maintain single-family residential neighborhoods. His Senate Bill 827 would have required California cities to permit midrise-apartment construction—buildings rising up to 45 or 55 feet—around train stations and busy bus stops. It was a radical attempt to subvert local control in the interest of creating more homes and would have opened up neighborhoods in San Diego, Los Angeles, and the Bay Area to row houses and small apartment buildings. Transit-rich San Francisco, where Wiener, a first-term legislator, previously sat on the board of supervisors, would have been almost entirely rezoned to accommodate a residential scale about half that of a typical Parisian street.

Opposed by virtually every Californian in a position of power, Wiener’s bill failed in a Sacramento committee on Tuesday. This had been widely anticipated; what Wiener and his co-sponsor Nancy Skinner, representing the East Bay, proposed was nothing less than to upend the entire framework for the past century of American racial politics and wealth building. But by forcing politicians and organizations to lay down their cards on restrictive residential zoning, SB 827 has neatly cataloged views over local control, affordability, transportation, and the environment in ways that observers sometimes had to project for themselves. It was, Berkeley-based housing activist Randy Shaw wrote, “the biggest public debate ever held in California over urban housing policy.” That debate has revealed hypocrisies alongside genuine concerns, and its collective effect has been both to defeat the bill and to increase the chances something like it could become law in the near future.

No interest group was more exposed by the saga of SB 827 than California’s environmental movement. Except for Malthusian tree-huggers who actively seek to reduce the state’s population growth—“California is full!”—virtually every environmentalist agrees that the place to build new housing is along transit lines. The opposite is currently happening: Barriers to building homes in cities have exiled development to the urban frontier, where subdivisions swallow up natural land far from the eyes of moneyed activists.

The national Sierra Club opposed SB 827 for the tenuous reason that it’s a “pre-emption” bill that tells cities what to do, like red-state bills that override progressive municipal goals. That analogy does not check out, since both Wiener and Skinner are big-city representatives trying to solve a big-city problem. It makes even less sense because the Sierra Club has supported eco-friendly pre-emption bills in the past. At the state level, Sierra Club California argued that allowing more infill development would push more residents to the exurban fringe. What?

Whatever success eco-conscious homeowner groups have had in maintaining backyards on the Westside of Los Angeles has been counteracted by development spilling into the far reaches of the Inland Empire. Partly as a result of this statewide trend, the average commute in San Francisco and San Jose has grown four times faster than the U.S. average since 2005, while billion-dollar investments in urban mass transit systems have failed to increase ridership. California’s greenhouse gas emissions come largely from transportation, and per capita emissions are higher in less dense, more car-dependent areas like Marin County than in comparatively built-up San Francisco.

Berkeley Mayor Jesse Arreguín called SB 827 “a declaration of war against our neighborhoods.”

The second-least convincing argument against SB 827 came from self-proclaimed mass transit advocates, including some environmentalists who argued that linking density to transit provision would encourage wealthy homeowners to throw trains and buses out of their neighborhoods. The risk of this is real, though Wiener has put forth three compelling counterarguments. First, transportation policy is often regional and thus slightly insulated from local NIMBYism. Second, caving to extremist overreaction before the fact is a recipe for never getting anywhere. (Many projected opponents have already spiked transit expansion.) Third, current land use is severely limiting the utility of the heavy, light, and commuter rail systems to which Californians have already committed billions.

The third-least convincing argument comes from homeowners, who were predictably outraged. SB 827 earned unanimous condemnation from the Los Angeles City Council, in part because of its anticipated effect on the city’s many low-slung neighborhoods. “This bill is still too blunt for our single-family-home areas,” a spokesperson for Mayor Eric Garcetti, who opposed the bill, said in February. Councilmember Paul Koretz said the bill would “destroy” Los Angeles. Berkeley Mayor Jesse Arreguín called it “a declaration of war against our neighborhoods.” Others simply lied about the bill’s effects. San Francisco supervisor Jane Kim wrote on Monday that SB 827 would allow “unlimited luxury condo high-rises.”

Here, things get tricky. While SB 827 would not have sent Los Angeles tumbling into the Pacific Ocean, it would have allowed for five-story apartment buildings in parts of the city currently zoned only for single-family homes. (An L.A. Times analysis identified 190,000 eligible single-family parcels in the city proper, which is only a fraction of the urban area.) It’s hard to say what the effect would be on these neighborhoods, because nothing like SB 827 has ever happened before. Wealthy neighborhoods would have mushroomed midlevel residential construction, generating new businesses and sidewalk traffic—though probably not with the same fervor that accompanies single-corridor rezonings. Some property values would have risen, and some would have fallen. Municipal finance recalibration might be next—as Lisa Schweitzer has written, Proposition 13, the 1978 referendum freezing the state’s property taxes, has given cities little way to benefit from new apartments. Renters (who make up a majority in many California cities) would have unprecedented freedom to live where they want.

Finally, though the zoning SB 827 aimed to undo was developed and deployed to enforce racial segregation, tenants and their advocates—including many people of color—were almost uniformly opposed, arguing that the bill would accelerate gentrification and displacement in underprivileged communities. Dozens of like-minded organizations in Los Angeles argued the bill would actually worsen the affordable-housing crisis by creating incentives for developers to demolish low-rent housing.

Wiener did address those issues—but not until late February. At that point, he inserted language deferring to localities on demolition ordinances and affordability requirements. But the perception had already been established that the bill, which had been endorsed by California’s major tech companies and other business interests, was of the top-down planning style that had long ago (and for good reason) been discredited in America’s black and Latino neighborhoods.

By the time a group of national fair-housing experts joined 22 California planning professors in endorsing the legislation on April 5, it was too late. “SB 827 alone cannot solve the problem of racial residential segregation, but it is a major step in the right direction, by overcoming the most pernicious force that maintains racial and economic segregation, restrictive and exclusionary land use policies,” the fair-housing group wrote. “While segregation across California’s metropolitan regions is paradoxically exacerbated by displacement from historically segregated and disinvested neighborhoods, this is occurring even in the absence of new development.” Open development would make California fairer and more diverse, they wrote. Finally, on April 12, the Non-Profit Housing Association of Northern California, which represents more than 750 affordable housing developers, announced its support.

California is basically one enormous gentrifying neighborhood.

This discrepancy between activists, politicians, and tenants on the one hand and builders and experts on the other is partly explained by the way the bill evolved. Had the fair-housing community been on board from the start, Wiener might have managed to cement the link between the largely white YIMBY movement and the largely minority fair-housing movement that preceded it by 50 years. After all, it was upwardly mobile black families who started the fight against exclusionary zoning in the suburbs. Situating his bill in the fair-housing tradition would have helped Wiener gain support in places like Los Angeles.

Of course, California cities are in a very different place now than in 1968. Gentrification and displacement have flipped the significance of zoning laws in high-cost cities. Walls intended to confine now promise security. Local control is now seen as empowering communities of color, though their neighborhoods bear the brunt of new development because the system ultimately grants white neighborhoods more power still. The bottleneck in housing supply is so tight that it’s accurate to equate new construction with luxury housing. But breaking down zoning in the state’s all-but-gated suburbs, where SB 827 would have the most dramatic effect, is not a mission that YIMBYs invented.

The difference in perspective between experts, including builders, and residents isn’t just a matter of how tenant protections were tacked on, though, or how times have changed. For every person of limited income who has managed to remain in a transit-rich neighborhood of Los Angeles, Oakland, or San Francisco, the status quo is just barely working. Who can blame them for resisting a proposal that has been widely identified as a policy earthquake, when the situation seems so precarious? For them, things can get worse.

From a bird’s-eye perspective, though, it’s not clear that things can get much worse. Consider the Bay Area, where the nurse in San Jose flies into work from Idaho and where families living in cars dump their feces into storm drains across the street from the future Chan-Zuckerberg School, a philanthropic endeavor of the Facebook founder and his wife that’s a five-minute drive from the company’s global headquarters. In the past five years, the Bay Area has added 373,000 jobs and built only 58,000 units of housing. California homes cost 2½ times the U.S. average, and higher still in the coastal metros that SB 827 would address. The California Legislative Analyst’s Office estimated in 2015 that the state’s major metro areas between 1980 and 2010 built barely half the number of housing units needed to keep price growth in line with the U.S. average. Hundreds of thousands of low-income households have left the state over the past decade, replaced by high-earning new arrivals. California is basically one enormous gentrifying neighborhood. What does “worse” look like?

The good news, if there is any, is that the crisis has created a constituency: Just 54 percent of California households own their homes, the third-lowest rate in the nation. If any state were positioned to pass a state law for renters, this is it.