Americans love local government after all. But local governments face their own set of bad incentives that predictably lead to bad policymaking. Cities are apt to misbehave in many areas that impact the quality of urban life; sometimes, state preemption should be a welcome corrective.

The affordable-housing crisis offers an instructive opportunity to witness the positive powers of preemption. When local policymakers try to write a zoning code they are supposed to be looking out for the long-term, aggregate interests of the community. In practice, though, politically active homeowners want to protect the value of their home by any means possible––including regulatory measures. This influence often leads to overly restrictive land-use planning. And, as a result, vulnerable groups regularly get shafted—renters and small business owners, among others—by city planning. The same happens with ride-sharing, home-sharing, and occupational licensing, where politically powerful industry groups can lobby for regulations that serve their interests, at the cost of overall community well-being.

This is where the state comes in: State policymakers are often removed from the parochial interests of NIMBY neighborhood groups, local taxi monopolies, and hotel lobbies. They are also judged on the performance of the state as a whole. This means that they can take a broader view on certain issues. Given that local governments are “creatures of the state,” state policymakers can, in a sense, regulate the regulators, determining how local governments can and cannot operate.

Thanks in large part to the total domination of local planning by anti-development NIMBY interests, many California cities face a severe housing shortage that is displacing the poor and hurting the U.S. economy. State preemption—with the backing of the burgeoning YIMBY movement—can attempt to address that. Under legislation proposed by State Senator Scott Wiener—which will likely be part of a grand compromise on housing later this month—needed developments in cities that aren’t building enough housing could enjoy a streamlined permitting process. This follows on last year’s state preemption of restrictive local accessory dwelling unit laws, making it easier to turn unused sheds and garages into additional units of housing.

Extending state preemption to other areas of planning could also go a long way making our cities freer and greener.

State preemption in the realm of land-use regulation isn’t limited to housing affordability issues. More states are preempting the right of cities to zone out solar panels and wind turbines, easing NIMBY-driven restrictions on cheap, renewable energy. Extending state preemption to other areas of planning—including restricting the ability of cities to require parking, mandate large lots, and prohibit multifamily housing—could also go a long way making our cities freer and greener.

In place of this patchwork of restrictive regulations, Texas will enact a statewide baseline for what cities can and cannot regulate when it comes to ride-sharing and home-sharing. For both branches of the sharing economy, state policymakers removed arbitrary caps and excessive permitting restrictions and replaced them with baseline of safety regulation and adopted an efficient statewide system of tax collection.

Although the legislation didn’t make it through this session, Texas is also exploring how the state can limit local occupational licensing, which places high barriers to entering fields like floristry and hair braiding; many economists argue these licenses largely serve to protect incumbent firms from new competition. As with housing affordability, state preemption in this field helps protect politically weak upstarts from regulatory capture by established players.

Cities are great at many things and deserve more autonomy. But in some areas, cities fail in predictable ways due to the political pressures that local policymakers face. It’s in these areas—where local planning undermines housing affordability or local regulation undermines healthy competition—that state preemption can improve the quality of life in cities.

In southwest Connecticut, the gap between rich and poor is wider than anywhere else in the country. Invisible walls created by local zoning boards and the state government block affordable housing and, by extension, the people who need it.