In a nutshell when you buy an ad from Google you do so from Google Ireland rather than Google UK. Thus tax on any profits ends up in the Irish Treasury rather than the UK one.
Now, can we actually identify how this state of affairs has come to pass? Why, actually, yes we can. It’s called the European Union.
Part of this Single Market thing is that any company registered anywhere in the EU can trade anywhere else in the EU. VAT is to be collected and paid at the rate of and to the government of where the sale takes place (the physical location of the customer).
Corporation tax is paid at the rate of and to the government of the country where the supplier is located (legally located and registered that is. The brass name plate.)
That’s it. Google is simply doing not just what it is allowed to do under EU law but what it is positively encouraged to do under EU law. Take part in the Single Market.
Strangely, we don’t see any of the federasts complaining about Google paying Eire instead of the UK pointing this out. That it’s an inevitable consequence of the EU and the Single Market.