"
Are countries, simply put, afraid to put an end to tax schemes like this, because it would just mean that Ikea or Google would pack up and leave?"
In an "odd" application of market-competition, that is precisely what happened. Countries where Google generally did business wanted to tax Google at some X. Then along came Ireland, or Google found Ireland, and saw that they could do some legal paperwork and pay Ireland's tax rate of X-Y instead of X in the "source" countries.
The point I'm making is that Google did pack up and leave, and it will happen again unless really drastic actions are taken against them. I don't think anyone wants to do that, at this point.
You either bully all countries from allowing loop holes such as this, even though they don't want to. Or you disallow Google from operating in your country if they don't pay taxes on the profit from "sales" you deem occurred in your country. Small countries that want/need that tax revenue from Google, even if it is X-Y, won't like it if you compel them into complying and causing Google to "pack up and leave". It also puts the "bullying" nature of whatever international body is tasked with enforcing this into light.