Since tax avoidance is currently in the news, I'm linking to a couple of interesting articles that I have recently read on this topic. First, Gaps and holes: How the Swiss cheese was made is an account of how the modern system of tax havens developed. The story is basically that during decolonisation, former colonial powers - and especially the UK - were happy to let their former colonies become tax havens because the colonies commonly had no major industries. This didn't impact too much during the formation of welfare states because globalisation hadn't gone all that far, which meant that it was difficult to protect your wealth all that much. As the world shrunk, though, it became vastly easier to earn money in one country but register it elsewhere. Tax avoidance existed prior to globalisation, and was a major source of income for tax havens before globalisation, but it was globalisation which made it the major political issue that it now is.
Second, India's Curry Tax Exclusion Goes Awry is the story of a very fun avoidance scheme in India. The government declared that, in an attempt to lure international food companies to India, all businesses producing curry would face a specially lowered tax rate. Unfortunately, it defined curry not by its function but by its content - with the result that all sorts of companies have been able to access this reduced rate. The extreme end of this is that steel producers have been mixing in peppercorns and declaring the resulting steel to be curry. In a victory for enforcing the law as it is actually written, the courts have upheld this.
The point common to both of these - tax avoidance is not simply something that greedy rich people and corporations do. It is a result, intended or otherwise, of government policy. The fact of tax avoidance is yet another reason why taxes should, above almost all else, be simple.
PS. To be clear, in this piece I am talking entirely about tax avoidance (which is legal) and not about tax evasion (which is illegal). These are related but separate issues and require separate treatment.