Ocean shipping is very very cheap. Less cost in money and energy to ship a chip across the ocean than for you to drive to best buy to buy the phone its in.
However, talking about chips that are hundreds of watts each the pollution produced by them is a lot higher than any transport.
https://www.stg-online.org/onTEAM/shipefficiency/programm/06...
TSMC alone accounts for 12% of Taiwan's electricity demand, and growing fast:
https://spectrum.ieee.org/taiwan-semiconductor ("TSMC’s Energy Demand Drives Taiwan’s Geopolitical Future" (2024))