In a sense, these corporate (and on the next scale up, governmental) decisions have a large scale social cost that is externalized when it should probably have to be borne by the company. A generation of men that should have grown up to take their father's place building cars instead are relegated to either leaving their city or accepting one of the lesser jobs that they're forced to fight for; meanwhile the shareholders of the company profit from lower labour cost somewhere else.
Capitalism offers no means of dealing with this problem; creating this problem is incentivized. Many of the problems capitalism does solve, it does so through quantization of value; perhaps we need to find a better way to map social value as a second or third order system out beyond raw currency so that we don't destroy it.