When I set out to cover climate change and urban policy, I never thought that I would wind up helping to develop talking points for Rick Perry, the far-right, climate science–denying, fossil fuel–loving ex-governor of Texas and presidential candidate. And yet, as David Graham of The Atlantic noted, Perry’s big speech on race last week had a section that sounded as if it could have been written by yours truly:

In blue-state coastal cities, you have these strict zoning laws, environmental regulations that have prevented buildings from expanding the housing supply. And that may be great for the venture capitalist who wants to keep a nice view of San Francisco Bay. But it’s not so great for the single mother working two jobs in order to pay rent and still put food on the table for her kids.

Perry — who is best known for making George W. Bush seem intelligent by comparison  — obviously did not come up with this cleverly framed zinger himself. But perhaps his speechwriter has been reading Grist or some like-minded websites. It has become commonplace in the policy-wonk corner of the internet to blame the nation’s densest, lowest-emissions cities like New York and San Francisco for their high cost of housing. Zoning that restricts density contributes to the shortage of housing supply, thus driving up prices and restricting population growth. Whether it’s The Economist’s Ryan Avent inveighing against “the rent-seeking NIMBYs of San Francisco,” Slate’s Reihan Salam calling San Francisco “an oversize gated community,” or me declaring that the city “must build upward,” there’s a growing chorus arguing that more housing in already dense cities like San Francisco is the path to affordability and sustainability. That expensive coastal cities are also among the country’s most liberal adds an apparent hypocrisy — one that conservatives delight in pointing out — to their development restrictions that price out the poor and keep their emissions from coming down further.

But Perry, unsurprisingly, is missing the big picture. It would be wonderful if the nation’s problems with sprawl and housing unaffordability could be solved by upzoning in a few cities like New York, San Francisco, Boston, and Washington, D.C. Unfortunately, those cities are not actually the primary driver of these problems and they cannot solve them on their own.

Grist thanks its sponsors. Become one.

Take a step back and think about where most Americans actually live versus the elite who write for the national media. Almost three times as many people live in the suburbs of the 51 largest major metro areas than in the inner cities. When young journalists — who are disproportionately likely to live in cities — talk about the high cost of housing in San Francisco and New York, they often conflate the problems of the metropolitan regions and the central cities. Most people in “San Francisco” don’t live in San Francisco. They live in the suburbs of San Francisco, which are hideously expensive: four of the 10 towns with the highest home prices in the U.S. are Bay Area suburbs.

San Francisco’s and New York’s (also very expensive) suburbs have much lower-density zoning restrictions than the cities themselves. New York City is more than 10 times denser than its suburbs. Most suburban areas allow only detached houses with big yards. The suburbs also have more parking-space requirements and segregated uses that make walking unpleasant or impractical and force people to drive. That’s why the average resident of New York’s suburban Great Neck, Long Island has twice the carbon footprint of the average Manhattanite. That’s also why — despite all the hype about gentrification and the high cost of inner-city housing — Manhattan, like New York City’s other boroughs and like San Franciso, has a lower median household income than any of its surrounding suburban counties. The suburbs are just as unaffordable as the inner cities, even more so when you factor in the cost of owning a car and driving everywhere. Metro areas like New York and San Francisco are economically strong and culturally desirable, so even without any market restrictions, it would be hard for housing supply to keep pace with demand. Development restrictions may make it even worse, but that’s an even bigger problem in the suburbs than in the cities.

Long Island is also much more conservative and Republican than New York City is. Liberals are actually better than conservatives about allowing more density in their communities. Polling also shows that liberals are far more likely than conservatives to say they would accept a smaller home in order to live in a walkable urban environment.

That’s not the only inconvenient truth Perry should wrestle with if he actually cares about this problem. While Perry rails against “blue-state coastal cities,” you know who else restricts density? Cities in Texas. And the reasons are completely selfish. Consider this report from last October in the Houston Chronicle:

Grist thanks its sponsors. Become one.

A stretch of Riverside Terrace, a rebound neighborhood known for its “large lots, mature trees and a view of the downtown skyline,” will be the first residential pocket in Houston where homeowners can use a new city code provision to fend off unwanted townhome, condo or residential tower developments. The City Council on Wednesday voted to grant residents in the 68-lot swath the right to establish a “special minimum lot size area,” a tool created by recent changes in the Houston development code to counter some of the tearing down, paving over and skyward building across the region.

This is classic not-in-my-backyard-yard, inefficient, anti-density zoning. A neighborhood of large lots wants to maintain its views of downtown, so it successfully lobbies the government to disallow developers from building the tall buildings that the market would support. So much for the myth that Houston has no zoning; it’s actually loaded up with rules mandating large lot sizes and ample parking. This is bad for the environment, it drives up the cost of housing, and it’s going on right in Perry’s own state.

It turns out that cities in blue states are actually far better than cities in red states about allowing dense development. New York and San Francisco are by far the two densest cities in the country — much more so than any red-state cities. New York has over 27,000 people per square mile and San Francisco has more than 17,000. The dropoff below that is steep, with a only a few big blue-state cities such as Boston and Chicago having even more than half of San Francisco’s density. Compare that to the biggest cities in the most conservative states: Houston has 3,500 people per square mile, Phoenix has 3,665, Salt Lake City has fewer than 2,000 people per square mile, and Oklahoma City fewer than 1,000. This is partially the result of onerous government regulations in these supposedly free market–friendly cities. Take a look at, say, Phoenix’s zoning map, and you can see that almost the entire city is dedicated to single-family detached housing lots, with barely any areas that allow attached townhomes or mixed uses. And those single-family home districts can have absurd requirements such as 35,000-square-foot minimum lot sizes, 40-foot setbacks from the street, and maximum heights of just two stories.

While these cities have cheaper housing than San Francisco, much of that cost advantage disappears when you factor in the cost of transportation in car-dependent sprawl. As Derek Thompson noted in The Atlantic in 2012: “Housing in Houston isn’t so bad — it’s the 8th most affordable large city to own a home in. But … factor in transportation, and it’s the 8th least affordable large city to live. On the other hand, dense expensive cities like San Francisco, Boston and New York are considerably more affordable when you add in transportation costs because of their superior public transit.” Insofar as Houston is cheaper than San Francisco, it’s not because Houston hasn’t restricted development. It’s because not as many people want to live in Houston as San Francisco, Houston’s wages are lower, and the cost of driving leaves Houstonians with less income to bid up the price of housing.

While it’s a good idea to build more housing and office space in dense, expensive coastal cities when possible, we can ultimately cram only so many people into them. Even if San Francisco could double its population — and it would be great if it could — that wouldn’t solve the emissions or housing-plus-transportation affordability problems facing the majority of our country. Most of these coastal cities are, in fact, building new housing and growing their populations. New York and San Francisco are both at all-time population highs. D.C. has the most housing units it has ever had. (As I explained in a recent article, D.C. and Boston have added housing and population in recent years but they remain below their peak populations because of social changes that have led to fewer people per household.) It’s the dearth of transit-accessible, walkable, urban places that leaves these few cities in such high demand.

So it is hardly fair or illuminating to place the blame solely on cities that are already a lot more dense than their suburban neighbors or sprawling Sun Belt counterparts. Some of these dense, expensive cities actually provide a lot more affordable housing than their suburbs as well. New York City, for example, has more than 600,000 people living in public housing or receiving Section 8 housing vouchers, while neighboring suburban Westchester County had to settle a lawsuit with the federal government in 2009 for having refused to build affordable housing in many of its affluent and overwhelmingly white towns.

Perry implies that if zoning laws were loosened, affordable housing would be built right on San Francisco Bay. Bullshit. San Francisco could allow taller buildings in its prime locations and maybe that luxury housing would be a little less expensive, but there is so much excess demand that the market rate housing still wouldn’t be affordable to low-income people. (There would be a much smaller amount of affordable housing created under the city’s inclusionary zoning requirements.) That’s especially true now that rich foreigners are buying the fancy new apartments in cities like San Francisco, New York, and Seattle as investment properties and vacation homes. Give developers free rein in high-cost cities and they will build for the high-end market. (It may simply be, given the cost of land and construction in these cities, that building low-income housing without subsidies just isn’t profitable.) Maybe a lot of new development will slow the trickle-down of yuppies pushing into existing housing stock, but pretending that upzoning alone will provide enough affordable housing for all the low-income workers who make a city run is just doctrinaire free-market ideology. Sorry, but the free market alone is not going to solve this problem.

If we want the benefits of more affordable and denser, lower-emissions housing, there are a whole bunch of bigger policies than revising San Francisco’s zoning code that a presidential candidate could propose. We need to stop subsidizing suburban sprawl with market-distorting subsidies like the mortgage-interest income-tax deduction. We need to build mass transit so that more areas of cities and suburbs are transit-accessible, cutting transportation costs and emissions. We need to invest more in federal, state, and local affordable housing programs like Section 8. We need regulatory government interventions like mandatory inclusionary zoning that forces developers to set aside some units as affordable, and we need pied-à-terre taxes to discourage out-of-towners from bidding up the cost of housing. We need suburban counties and towns to build more affordable housing, reform their zoning codes to allow density and mixed uses, and reform their transportation policies to require walkability and bikeability. And we need all those same policies in sprawling, inefficient, low-density cities like Houston, too. Unfortunately, congressional Republicans have repeatedly cut funding for affordable housing, smart growth, and mass transit programs.

I eagerly await Rick Perry’s next speech where he talks about all of that.

Correction: This article originally neglected to mention that, due to San Francisco’s inclusionary zoning, some affordable housing development accompanies market-rate projects.