They would have the right to do so. And other country might have the right to place a 150% tariff on this country goods. Or place those on the tax haven list. Other countries cannot stop them from applying a zero tax. But those same countries that provide all the markets, infrastructure, schools, manufacturing and support all the population to make it work can also choose not to trade with those.
It would be fair, but the EU prohibits it. So the company creates fake expenses in tax-flexible countries to avoid paying taxes in the country, where they generate revenue. That's the issue.