GettyImages-696676192 (1)
A woman walks past the Amazon Go grocery store at the Amazon corporate headquarters on June 16, 2017 in Seattle. Getty

There are plenty of reasons to be concerned about President Trump's tirades against Amazon (NASDAQ:AMZN). For starters, it's unseemly for a president to be attacking an American company, especially when he appears to be seeking to damage the company and its stock price. Trump's attacks on Amazon are also tied to The Washington Post, which Amazon CEO Jeff Bezos separately owns, and therefore seen as an attempt to influence the Post's coverage. And many of Trump's claims about Amazon are not accurate or are grossly exaggerated -- for instance, that the e-commerce giant is cheating the United States Post Office.

This article originally appeared in the Motley Fool.

However, on at least one account, Trump is correct. Throughout its history, the e-commerce giant has been a master of tax avoidance, leveraging laws that don't properly account for internet sales and playing states and municipalities against one another for tax breaks.

Until the stock's recent dive, Amazon was the second-most valuable company in the country, worth nearly $800 and behind only Apple. However, the company paid no U.S. income taxes on a $5.6 billion in domestic profits last year thanks to a $789 million windfall from the new tax law, according to the Institute on Taxation and Economic Policy.

During the five previous years, Amazon had an effective tax rate of just 11.4%, said the ITEP, compared to its traditional retail peers, who generally paid between 35% and 40%. While there are a number of reasons Amazon is one of the most powerful companies in the world, its ability to avoid taxes is one of the biggest and most often overlooked.

The sales tax game

Laws are often slow to evolve to respond to technological advances. Municipalities continue to struggle with "sharing economy" companies like Airbnb and Uber, and cryptocurrencies have similarly been a challenge for regulators.

In its rise to retail dominance, Amazon also exploited this regulatory delay. In the pre-internet era, sales taxes, which are imposed by states and municipalities, were only assessed if a retailer had a physical presence inside that domain. For most of its history, Amazon avoided charging sales tax on most of its customers by shipping goods from the few low-population states where it had warehouses. That strategy gave Amazon an unfair advantage and deprived states and municipalities of revenue they would have normally collected. The National Bureau of Economic Research estimated that Amazon's sales fell by nearly 10% when that tax advantage disappeared.

When that strategy no longer became tenable, and as Amazon wanted to add more warehouses in more states to support its growing Prime two-day delivery program, the company often negotiated to get the taxes delayed, deferred, or reduced as a condition of collecting them. Even today, Amazon's third-party sellers, a significant portion of its business, often don't collect sales taxes, and Amazon itself doesn't always collect local sales taxes.

The HQ2 bonanza

Companies often pit states against each other in order to get the best tax incentive package available, but Amazon took this tax avoidance strategy to a new level with its search for a second headquarters. The company solicited bids from cities and regions interested in hosting its second headquarters, promising $5 billion in investment and 50,000 new jobs over the next decade. Amazon received over 200 bids with offers as lucrative as $7 billion in tax incentives from Newark, and Chicago offered to let Amazon keep over $1 billion in income taxes that would normally go to the state. Again, this method is not unique. Foxconn just squeezed billions of dollars in incentives out of Wisconsin for locating a new plant there, but Amazon's size gives it undue sway in easing its tax burdens and tilting the playing field. Its strategy with the Post Office has been similar, as it's scored perks like Sunday delivery and lower rates that would not be available to a smaller company.

The long-term strategy

Throughout its history, Amazon has consistently reported minimal profits, meaning it has paid very little in taxes since taxes are assessed based on profits. While that strategy is generally seen as sacrificing profits for market share and long-term competitive advantages, it's also a way of avoiding taxes, especially compared to its rivals, who pay some of the highest tax rates in business. Between 2008 and September 2017, for example, Walmart (NYSE:WMT) paid $64 billion in income tax, compared to just $1.4 billion for Amazon, even though Amazon has been the more valuable company for several years now.

Avoiding taxes is standard practice for businesses, but few companies have benefited from exploiting the system more than Amazon, and those strategies have given the e-commerce leader a decided advantage over its heavily taxed retail rivals.

There's no question that Amazon has weighed on the profit growth of its retail peers. By avoiding its own taxes and lowering industry profits, the company is reducing the broader retail corporate tax base. It's not surprising that such an issue would attract government attention.

gettyimages-144229773_large
Taxes Getty