SAN FRANCISCO—The protest kicked off just a few feet from Super Bowl City, the commercial playground behind security fences on the Embarcadero, where football fans were milling about drinking beer, noshing on $18 bacon cheeseburgers, and lining up for a ride on a zip line down Market Street.

The protesters held up big green camping tents painted with slogans such as “End the Class War” and “Stop Stealing Our Homes,” and chanted phrases blaming San Francisco Mayor Ed Lee for a whole range of problems, including the catchy “Hey Hey, Mayor Lee, No Penalty for Poverty.” They blocked the sidewalk, battling with tourists, joggers, and city workers, some of whom were trying to wheel their bikes through the crowd to get to the ferries that would take them home.

San Francisco is a city that loves to protest. This is where many counter-cultural movements gained traction: the hippies, the beat generation, the gay-rights movement.

And protests in recent weeks have followed in that tradition. Last month, during Martin Luther King Jr. weekend, people demanding racial equality chained themselves to their cars and blocked all five lanes of the Bay Bridge. Protesters drowned out a Boys’ Chorus during Mayor Ed Lee’s inauguration last month, calling for the city’s police chief to resign. The protest outside Super Bowl city was the first of many expected during Super Bowl week, including one by thousands of Uber drivers who say they plan to bring traffic to a standstill around Levi’s Stadium in Santa Clara.

As Super Bowl 50 and hordes of tourists and media descend on the city for Sunday’s game, though, there’s a sense in San Francisco that something is very wrong, that recent changes in this city have created intolerable inequities and made just living here too hard for all but the most well-off residents.

Eric Risberg / AP

Put simply, the city has gotten too crowded and expensive for all the people who want to live there. That’s driving up prices, leading to evictions, and changing the tenor of the much-beloved city on the Bay. Protesters may be chanting about racial justice and homelessness and tech workers, but at their heart, many of the protests are about what kind of city—and whose city—San Francisco will be.

The median rent for a one-bedroom apartment hit $3,530 in August of last year, a 14 percent increase from the year before (that contrasts to $3,160 for a one-bedroom in New York last August). The median rent for two bedrooms in August was $4,900.

The problem can be partly explained by supply and demand. The city has added 45,000 residents since 2010, but has built just 7,500 new housing units, according to a report from Paragon Real Estate. What’s more, the city has failed to build enough new housing for decades, largely because of restrictions of what can be built where. The planning and approval process is also a mess: Projects can be approved and can languish for years, tied up in lawsuits and as developers wait for permits from city staff. Gabe Metcalf, of SPUR, estimates that San Francisco has only built 1,500 new units a year for the past two decades, a time during which the population added nearly 200,000 people.

At the same time, people are flocking to the city, and it’s easy to see why. As the protesters chanted outside Super Bowl City, the sun was setting on the San Francisco Bay, casting a golden light over the hills of Marin, Berkeley, and Oakland. People walked and ran outside in the balmy weather, watching the ferries and sailboats gliding through the water. Workers hurried from jobs under the tall buildings of downtown, home to booming companies such as Salesforce, and meandered to the fancy restaurants that now line the city’s streets. This is a very appealing city, with lovely scenery and a growing number of jobs for the well-educated. But in an attempt to preserve the city’s current look and feel, San Francisco has failed to approve zoning changes that would allow developers to build enough units for all the people moving here.

“The economy of the city and the Bay Area is just so strong and the city is so attractive to people from all over the world that we are simply faced with a huge growing demand of people wanting to be here,” Metcalf said. “At the same time, we made some mistakes with regard to housing policy. It boils down to a very simple thing—we didn’t allow the supply of housing to increase enough to keep up with the growing demand to live here.”

In other words, this is a zoning problem. In the early 1970s, a series of decisions were made to “downzone” areas of the city to prevent it from changing, Metcalf said. Those decisions limited where high buildings could be built and restricted where dense office and residential spaces could go up. The below San Francisco Planning Department map indicates that most of the residential lots in the city are restricted to three units per lot.

The light yellow areas indicate where zoning limits residential buildings to three units per lot. The darker orange, concentrated mostly near downtown, indicates zoning that allows one unit per 200 square foot. Red is downtown office, purple is commercial. (San Francisco Planning Department)

This was one of the things that first struck me when I arrived in San Francisco. I’d heard about the high prices and lack of housing, and thought the city would be, like New York, finding creative ways to pack in more living spaces and cars and offices and people. But San Francisco isn’t very dense at all. Some of its hottest areas are still taken up by multi-level above-ground parking lots. Its streets are dotted with one-story commercial buildings, even in neighborhoods like the Marina District, where people really, really want to live. Its waterfronts still feature empty warehouses and industrial spaces, and even developers who want to divide Victorian homes into separate units to fit more people are rebuffed. In much of the city, anyone who builds a new unit is required to also build a parking space with it—one of the only ways to get around that regulation is to have a hearing. Stand atop Twin Peaks and look over San Francisco, and it’s hard to see any apartment buildings at all: Most of the buildings are either the tall office buildings of downtown, the colonial Spanish-style churches of the Mission, or the three- and four-story homes that are just about everywhere else.

It’s a big contrast to New York City, where you can’t miss the scaffolding and cranes and construction when you walk down the street, regardless of what borough you’re in (okay, maybe not Staten Island). In New York, parking garages are compressed into small spaces with wacky stacking systems where cars ride elevators to be parked. There, just about every empty warehouse, building, or park is in the process of being converted into something. In San Francisco, everywhere you turn there are empty lots or empty commercial buildings that would make for great spots for apartments.

“We have plenty of room to add housing—but yes, it would mean bigger, taller buildings, it would also mean more people getting around by bike and transit rather than driving,” Metcalf said.

A view of San Francisco from Twin Peaks (Marcio Jose Sanchez / AP)

The San Francisco Board of Supervisors could change the city’s zoning to allow more tall buildings, but they’d likely face opposition from residents who still don’t want the city to change, Metcalf said. After all, if you own a home in San Francisco, you are likely seeing its value skyrocket as demand continues to increase and supply remains low. And why support new building that might block your view or your sun or bring hassles into the neighborhood?

Protests aren’t focused on zoning changes or creating more affordability, though. Instead, they’re encouraging the city to ask the NFL for reimbursement for the $5 million San Francisco is spending on city services like police ahead of the Super Bowl, asking the city to divert that money to resources for the homeless population. They’re protesting over alleged police actions that moved homeless residents from the space around Super Bowl City and carrying around signs with swastikas that read iSlave. (For a good summary of why tech workers aren’t solely to blame, read my colleague Conor Friedersdorf.)

At the protest, I talked to a man with a flowing white beard who identified himself as Ron Ron, and who has lived in the Bay Area since the 1970s.

“This is globalization, this is what Obama's brought on, this is what Ed Lee has brought on,” he said. “It’s called capitalism, Darwinism, survival of the fittest.”

The city’s newest residents are only concerned about tech and about sports like the Super Bowl, but ignore the homeless who are out on the streets because San Francisco is too expensive, he told me. He disagreed with the idea that building more apartments would help, though.

“Everything they build is for rich people,” he said.

In fact, San Francisco has some of the best inclusionary-zoning laws in the country, better than those in New York, Metcalf told me. Any new building with more than 10 units has to set aside a certain number of units for affordable housing. Building more units throughout the city would be a very good start to creating more housing for the rich and poor alike, he said. It’s just a question of how to get those units approved, permitted, and built.