https://www.theguardian.com/technology/2015/jun/24/amazons-u...
If I'm in the UK and choose to buy something from Amazon, it will be shipped from a warehouse in the UK owned by Amazon.co.uk Limited.
However, I pay my money to Amazon EU Sarl which is based in Luxemburg. This company is a tax shell, it contracts back to amazon.co.uk for the fulfilment. The Sarl keeps all the profit.
According to this https://beta.companieshouse.gov.uk/company/FC032354/filing-h... (see full accounts, which ironically are served from AWS), the SARL made profits of €481m in 2016. Futher down the PDF we see they are involved in a number of tax disputes about this.
Fundamentally if I buy goods from a .co.uk website that are shipped from a UK warehouse, it is very hard to argue that the profit should be counted in Luxemburg.