They had money because of aggressive accounting tricks. I despise such marketing until Apple starts paying right tax, they stop derailing right to repair and free their walled garden for 3rd party developers.
They are legally obliged by their shareholders to reduce their tax burden in any way legally possible. Blade the US Government for allowing these loopholes.