Amazon has suffered a setback in its own backyard as several candidates for Seattle's City Council won election despite a $1.5 million campaign by business groups to defeat them. That included Kshama Sawant, an incumbent and socialist who has been a thorn in Amazon's side in recent years. The vote was held last Tuesday, but the results only became clear in recent days.

The result is significant for Amazon because last year Seattle's city council passed a $275 per employee tax on large employers. Amazon, Starbucks, and other large Seattle businesses blasted the law and funded a ballot measure to overturn it. Facing the threat of having their law overturned by voters, the city council itself repealed the measure a month after it passed.

If business groups had defeated pro-tax candidates in last week's election, it would have made the city council very reluctant to consider taxing employers again. Instead, the election results have emboldened supporters of an "Amazon tax."

The most significant race was probably the re-election of Sawant. Business groups spent $617,592 backing her opponent, Egan Orion, according to a Seattle Times analysis. But Sawant won anyway by a margin of 51.6 percent to 48 percent.

"I look forward to working with the new City Council to urgently pass a strong tax," Sawant said in a Saturday news conference. She envisions using the proceeds to provide social services—including better care for the homeless.

Housing shortage drives backlash

Support for a tax on Amazon and other large businesses has grown as Seattle's economy has boomed. The growth of Amazon, Microsoft, and other big companies has created a crisis in the Seattle housing market as housing construction has failed to keep pace with soaring demand. As a result, young people—even those with decent incomes—have struggled to afford housing. Homelessness is a growing concern.

The obvious objection to taxing companies based on their headcount is that it would discourage companies from hiring more workers. In most cities, job creation is widely viewed as a positive. But things look a bit different given Seattle's dysfunctional housing market. Job creation will draw more people to the region, worsening the area's housing-affordability problem.

So the best way for Amazon and other big Seattle businesses to quell rising hostility would be to find ways to reform the region's housing laws to allow more housing to be constructed. That would bring down rents in the region and restore the normal rules of politics—where creating jobs is widely seen as a good thing.

Earlier this year, Microsoft announced that it was spending $500 million to promote housing construction in the Seattle area.

Meanwhile, Silicon Valley companies are dealing with an even more severe case of the same problem. Last week Apple announced a $2.5 billion initiative to promote affordable housing in the San Francisco Bay Area. Google and Facebook have each pledged to spend $1 billion on housing-related efforts.