The cost of intown housing makes suburbia fiscally tempting- but this is in part the result of deliberate policy choices by government.
Recently, I was meditating about the relationship between affordable housing and sprawl. It could be argued that auto-oriented sprawl, by opening up cheap suburban land for development, increases the housing supply and thus reduces housing costs. Under current conditions, this theory seems to correspond to reality for even for some people who value city life: a $200,000 house in Central Islip, Long Island (where I work) or even a $400,000 house in Mineola (a more desirable Long Island neighborhood) is certainly cheaper than a million-dollar condo in Manhattan, even if you have to buy a car to live in Central Islip.*
But it seems to me that the connection between suburbia and cheaper housing is not a law of nature: to the extent that it is true, it is true because of public policies. Throughout America, on both the Left and the Right, it is an unstated assumption that of course, energy and transportation should be cheap, while housing should be more expensive every year.
The most obvious public subsidy to transportation is the use of general tax revenue to support new roads and public transit systems that extend into suburbia. In addition, government tries to keep energy cheap- not just by failing to tax externalities of energy use such as pollution, but also by encouraging energy production. Liberals tend to favor subsidies for renewable energy, while conservatives are more interested in encouraging oil and gas production- but both groups tend to favor keeping energy (and thus transportation) cheap for the average consumer. Even though gasoline costs have increased over the past few years, they are still cheap enough to make auotmobile-dependent suburbs affordable for many (especially for people who work in suburbia and thus may not have a particularly stressful commute to suburban jobs).
By contrast, zoning law is designed to ensure ever-rising housing prices, by restricting the supply of housing. A developer must typically get government permission to build a lot of houses- and to build houses in any non-rural neighborhood, the developer must fight or compromise with neighborhood activists in order to get that permission. The neighbors are unlikely to support the new housing, since they can usually sell their housing for more if the supply is restricted. In addition, to the extent that there are noneconomic effects of new housing (such as increased traffic) the neighbors bear the burden of the new traffic, but don't get any obvious short-term benefits.
To the extent that local governments have any independent interests, they will favor new housing only if it is expensive, since expensive housing yields more property tax revenue. Thus, local governments are unlikely to favor large amounts of new housing only in certain unusual situations, such as where the housing is expensive enough to increase the local tax base.
It seems to me that just as cheap energy is noncontroversial, zoning laws that restrict housing are generally pretty noncontroversial; zoning is opposed on the Right only by hard-core libertarians, and on the Left only to the extent necessary to keep the poor housed.
It seems to me that zoning tends to increase urban property prices more than rural property prices. The most heavily settled areas tend to have the most neighbors who are likely to fight new housing. In addition, urban areas tend to be more fiscally stressed and thus to have governments worried about their tax base (either because they are big cities with lots of poor people who don't contribute very much to the tax base, or because they are suburbs worrying about attracting those poor people). Thus, urban and inner-suburban governments are less likely to permit new housing than thinly settled semirural areas. As a result, prosperous urban areas tend to allow less new housing, and urban areas will have cheap housing only where sprawl has reduced the demand for urban living.
Government's biases are not inevitable. In theory, government could be heavily biased in favor of environmental protection and preventing homelessness, instead of being biased in favor of protecting homeowners' interests in selling their homes for high prices or avoiding externalities from new development. In such an alternate universe, transportation prices would be high (because government forces up energy prices to encourage conservation) so moving to energy-consuming suburbs would be expensive. On the other hand, housing in my alternate universe could be like groceries- a little more expensive in Manhattan perhaps, but still so cheap that it would not make much sense to move to one neighborhood to another for cheaper housing. In such a universe, it would make no sense to encourage migration to suburbia in order to reduce housing costs.
In sum, the cost advantage of suburbia, where it exists, is not a result solely of the free market. Like suburbia itself, this cost advantage is a result of public policy.
*Of course, this is only true in metros where cities are more expensive than suburbs- which is not true everywhere. To find counterexamples, examine the Center for Neighborhood Technology's analysis of housing and transportation costs.

The End of Single-Family Zoning in Arlington County, Virginia
Arlington County is the latest jurisdiction in the country to effectively end single-family zoning.

The Quiet Housing Crisis in Rural America
While housing shortages in major cities are grabbing headlines, rural communities are seeing higher rates of growth in housing prices and a silently spreading homelessness crisis.

Skyline-Defining High-Rise Potentially Coming to Boise
A rendering making the rounds in Boise depicts a 40-story apartment building that would be taller than all other buildings in one of the fastest growing cities in the United States.

11,000 Housing Units Possible with S.F. Office Conversions, Study Says
A new study by SPUR and the Urban Land Institute’s San Francisco chapter estimates a specific number of apartment units that could be built from vacant office units in the city.

‘Arrested Mobility:’ How Transportation-Related Laws Impact Black Americans
A far-reaching new study highlights the disproportionate effect of biking and walking laws on the mobility of Black Americans.

California Attorney General Wants to Get Serious About Housing
A bill sponsored by the AG’s office would give the state’s top attorney more power to intervene in lawsuits related to the state’s housing laws.
Alamo Area Metropolitan Planning Organization
City of Kingsville
Princeton Planning
HUD's Office of Policy Development and Research
HUD's Office of Policy Development and Research
HUD's Office of Policy Development and Research
City of Spearfish
City of Lomita

Write for Planetizen
Urban Design for Planners 1: Software Tools
This six-course series explores essential urban design concepts using open source software and equips planners with the tools they need to participate fully in the urban design process.
Planning for Universal Design
Learn the tools for implementing Universal Design in planning regulations.