@nikolal In an ideal world that would be simple business calculation - in some cases it makes sense to attract foreign companies - even if they don't pay corporate tax directly, they pay salaries, social insurance, VAT etc.
Eastern Europe benefited a lot from foreign investments and I remember how devoid of any investments it was in early 90's. Obviously, this "tax honeymoon" shouldn't last forever and doesn't make any sense in developed economies.
This is where corruption comes...