Basically everyone in Corporate America is doing this. Its not just Google. If the EU (or us, or whoever) doesn't like this, then we need to change the laws.
They then don't pay the tax in the US because something something.
If you'd like them to pay tax on what they sell, then you should be charging a sales tax, a value added tax, or a receipts tax, not an income tax.
In a case where the IP was created in country X and later sold to a company in country Y, is country X owed a continuing taxation revenue stream after the sale closes (and any taxes due related to the sale are paid/accounted for)?
I might be wrong, but I think that's how it works, and if it is, that means a lot of the money is not "earned outside their domicile" quite as much as you'd think.