It's absolutely for that reason. TSMC might as well be Taiwan's defence force, given how useless the real military would be if invaded by PLA.
The sea between Taiwan and mainland China is really a formidable obstacle to such operations, even without radar, advanced missiles and drones. Ships are expensive, slow and vulnerable; even the Russians had to yield in the Black Sea after suffering serious losses against a nation with no navy.