The government does not encourage Amazon etc to avoid tax but it is complicit in Amazon's tax avoidance because it enacts legislative measures that are so badly drawn up that tax advisors can drive a coach and horses through them and is then very slow blocking these loopholes and frequently doesn't bother to do so.
The government want companies like this to invest in Britain, bringing wealth and employment and that is why, when, as the result of badly drawn up legislation, companies are able to protect their profits from tax, nothing is done to tighten legislation or block loopholes.
This is also what the government does over ISAs. They were introduced as a way of encouraging new long term saving. But what I and others are doing is not new long-term saving. We are merely taking money that we have already set aside for long term investment and transferring it to a scheme that gives me tax advantages. Were we unable to do this most of us would not take the money and wantonly spend it. It would stay invested for the long term.
The government knows this is happening and is complicit in it happening for political reasons. Those with sufficiently large capital resources to transfer money from one long term savings location into an ISA are more likely to vote Conservative as they are, by definition, better off and better off people are more likely to vote Conservative.
In each case the purpose and motivation is the same.