Apple is the latest tech company to announce its own plan for easing Silicon Valley's housing affordability crisis, and Sen. Bernie Sanders (I–Vt.) is not happy about it.

On Monday, the Cupertino-headquartered tech giant announced that it would be investing $2.5 billion into housing and homelessness initiatives, including money for affordable housing projects, mortgage assistance, and spending on the homeless.

"Before the world knew the name Silicon Valley, Apple called this region home," said Apple CEO Tim Cook in a press release. "We feel a profound civic responsibility to ensure it remains a vibrant place where people can live, have a family, and contribute to the community."

The company says it will create two $1 billion funds, one to finance public housing development, the other to assist first-time homebuyers.

In addition, Apple says that it will make $300 million of company-owned land in San Jose available for affordable housing. It will also launch a new $150 million affordable housing fund in the Bay Area. Another $50 million will be invested in a local homeless group in Santa Clara County.

But for the socialist senator and Democratic presidential candidate, Apple's sense of "civic responsibility" is a band-aid for a wound the company inflicted.

"Apple's announcement that it is entering the real estate lending business is an effort to distract from the fact that it has helped create California's housing crisis," Sanders said in a press release. "We cannot rely on corporate tax evaders to solve California's housing crisis."

In lieu of corporate philanthropy, Sanders has proposed a "housing for all" plan that would do many of the same things Apple is promising, just more so.

The senator would spend close to $2 trillion on building or rehabilitating low-income housing. His plan would also spend billions more on aid to first-time homebuyers and homeless services. On the regulatory side, Sanders' plan would cap rental price increases at 3 percent or 1.5 times the rate of inflation (whichever is higher), and enact new federal restrictions on evictions and mortgage lending.

The charge that Apple, and the tech industry more broadly, is responsible for California's housing affordability problems is not a view unique to Sanders. Indeed, it's a common refrain that an influx of tech jobs and tech money has made cities more expensive and less livable.

Everyone from Vice to The Verge has written about how Silicon Valley companies are attempting to solve a housing crisis they "helped create." A Los Angeles Times poll from last year found 15 percent of respondents blamed high housing costs on the tech industry; 13 percent blamed a lack of housing stock.

Both Seattle and San Francisco have tried to fund affordable housing and homeless programs with taxes targeted at high-grossing tech companies.

Indeed, the fact that not just Apple, but also Microsoft, Facebook, and Google have all proposed affordable housing initiatives shows how sensitive tech companies are to this charge.

But to blame the tech industry for high housing costs is to confuse a failure of government policy for capitalistic excess. It ignores metros that have managed to add jobs while staying affordable. Meanwhile, the misguided policies that make California such an expensive place to live would also prevent Sanders' chosen housing policy fixes from working.

On a superficial level, it is, of course, true that if you add jobs and people to an area faster than you add housing units, prices are going to go up. This is exactly what's happened in the tech-dominated areas of Silicon Valley and San Francisco.

According to a report from the website Apartment List, San Francisco has added 5.6 jobs for every housing permit it issued between 2008 and 2018. San Mateo County, just south of the city, had the same jobs-to-housing ratio over that time period. Santa Clara County, where Apple is headquartered, added 3.3 jobs for every housing permit in the last decade.

Because the Apartment List study looks at permits issued, not units built, it probably overstates how much housing construction has happened. One study of San Mateo County, for instance, found that the city had built only one unit of housing for every 20 jobs it had added.

Unsurprisingly, Bay Area rents and home prices are among the highest in the nation. Four of the top five counties ranked by median home price are in the Bay Area, according to the National Association of Realtors. The top 16 most expensive cities in which to rent a one-bedroom apartment are all in the San Francisco and Silicon Valley area.

The failure to build enough housing to accommodate new workers and the higher prices that come with that shortage are both largely the product of overregulation. San Francisco's zoning rules ban the construction of denser apartment buildings in most of the city, preventing it from growing up to accommodate new jobs and residents. Places like San Mateo and Santa Clara County combine these restrictions on multi-family housing with urban growth boundaries that prevent them from growing out.

All these places suffer from organized NIMBY opposition to new housing, whether it comes from homeowners or anti-gentrification activists; as well as a planning process that gives these NIMBYs ample opportunity to slow, stop, or shrink new housing developments.

Areas of the country that don't have such insane restrictions on development have managed to both grow and stay affordable.

According to Bureau of Labor Statistics data, lightly-regulated Houston has seen its civilian labor force grow by 20 percent in the last decade, compared to the San Francisco metro area's 16 percent. Some 21 Fortune 500 companies have their headquarters in Houston. What's more, for every job the Houston metro area has added, it's also permitted another unit of housing. As a result, the average rent for a one-bedroom apartment is $841, and home prices are below the national average.

To put it simply, high home prices and rents result from housing demand exceeding supply. Supply is low in the Bay Area because the bureaucrats and elected officials who run those cities kowtow both to property owners who don't want more housing and social justice activists who want more housing but only if no one makes any money off it. Together, these three groups are screwing over people who need an affordable place to live and the developers who want to build new homes.

One solution in California and elsewhere is to follow the Houston model of allowing private developers to build more housing. There's precious little of that in Sanders' housing plan, however. His 3 percent cap on rental price increases would effectively kill off any private investment in multifamily developments.

"Investors would move their money to other sectors of real estate. Developers would decide there are better things to build than apartments," Doug Bibby, president and CEO of the National Multifamily Housing Council, told CityLab in reference a 3 percent rent increase cap proposed by Rep. Alexandria Ocasio-Cortez (D–N.Y.).

Building massive amounts of new public housing units, as Sanders has proposed, could theoretically fill the gap. This PHIMBY (Public housing in my backyard) approach to the housing crisis, however, requires not only reforming zoning laws and overcoming NIMBYism, but also raising enough tax revenue to pay for all this new public housing.

Touro Law Center professor Michael Lewyn notes that this is unrealistic, "not just because of public taxophobia but also because the same progressives who favor public spending on subsidized housing also favor public spending on a wide variety of other priorities."

There's also reason to doubt Sanders' commitment to abolish the necessary zoning regulations that would allow for a public housing construction blitz too. Mother Jones has deftly reported on Sanders' long history of demonizing developers and supporting local anti-development candidates, including some in San Francisco.

Sanders' criticism of Apple's housing initiative is not just misplaced, it's also hypocritical. Rather than a regime of price controls, tax increases, and government spending, fixing America's housing affordability problems requires letting free markets actually function.