Most normal people don't own shell companies, only rich people and rich businesses. Apple invents all their patents in USA, sells them for pennies to an Irish shell company. Taxes Uncle Sam collects on that are fractions of a penny.
That shell company then licenses those patents to Apple for billions. The shell company makes billions and pays taxes in other countries while Apple uses those patent expenses as further tax deductions in USA.
And why do they do this? Because the US government allows this to be legal. If all you social warriors want to be mad at someone, be mad at congress because they could stop this any time they wanted. But they don't because they use the same methods themselves.
If you don't like someone driving what you think is too fast in your neighborhood, you get the speed limit changed, you don't criticize them for driving the speed limit.