I know that, and that is a problem. But even if they stopped doing that, Italy could easily see none of the taxes on profit. Italy's new law doesn't actually fix the underlying problem. Instead it's a tariff that somewhat works around the problem but also bans an entire category of inter-country trade, which is quite problematic.
Maybe I wasn't clear enough when I used a hypothetical situation to illustrate why Italy's law is attacking the wrong thing.
Italy's law blocks a German corporation from selling German-served ads on German servers to Italian customers. That's a problem.
Italy's law doesn't block a German corporation from using tax loopholes to never pay anything. Therefore those loopholes shouldn't be mentioned as a justification.