No one's core business is "avoid taxes". Apple's business is to sell computers and entertainment.
Opening an office for the sole purpose of avoiding taxes is not a core business, it's tax evasion, legal or not.
Opening an office for the sole purpose of avoiding taxes is not a core business, it's tax evasion, legal or not.
(In a corporate structure, which company do you think is legally obligated to maximise profit? The one at the top of the pyramid, or every individual registered company?)