Having worked for a startup and lost my job to remote workers in a foreign country because they were cheaper and being told "we can hire 3 or 4 of them for the price of you" has left a bitter taste in my mouth.
I can tell you that US tech companies making enormous amounts of money from your country's populace while contributing back near-zero jobs in return is just as bitter.
This line of reasoning is deeply flawed. If US tech companies are “making enormous amounts of money from your country’s populace”, then your country is getting something in return, e.g. access to Apples hardware products, amazons cloud, or googles search engine.
Why should it matter if they also open an office in your country?
It isn't at all, and having lived in countries on both sides of the coin, I can tell you that people are getting a worse product in return, without the local job creation. I've written more about it here [1]. A trivial example is Google Maps. I've gone a bit more in-depth on that example here [2]. In a nutshell, you get much less enshittification, far better customer support (humans instead of ML models), and all the other things that used to be completely normal but were slowly boiled away while getting people used to it in the name of shareholder returns.
For clarity, I took the discussion as being about software, as physical goods (including hardware) are an entirely different beast which my points don't necessarily apply to.
Getting the most product for the least amount of money is Capitalism 101. Companies don’t owe you anything past that and you should follow the same principle.
Do the least amount of work that’ll get you as much money as possible and always look for a better offer.