Foreign companies are welcomed in a country except when they have the strict policy of crushing the local development ecosystem. More precisely, when they actively suppress up-skilling.
Coding outside of work is frowned upon as this might lead employees to work with direct competitors. Let’s say this is a legitimate reason, then, there is no reason to ban OpenSource contributions. This level of ownership of an employee’s resources is plainly ridiculous. The employees cannot contribute to projects to help cool initiatives nor can they invest on themselves to become better.
Contributing to OpenSource strengthens a country’s developer ecosystem for free. Imagine if all companies had to forcefully upgrade a country’s ecosystem, they would whine about it. Local companies benefit when they have great resources around. When foreign companies set foot in a country with cheaper labor, they enter with a workers-squeezing mentality. They want only acceptable output at cheap costs. Even if the developers are burnt in the process. It’s an accept, suffer, or quit policy.
If the said entities employ thousands of workers, their policy becomes the norm in the industry. Oh you do OpenSource? We won’t hire you precisely because of this. If employees did not know or cannot contribute because of time, fine. Else, if this surprising policy exists as a norm, good elements won’t contribute to a country’s corporate culture. The ecosystem is then not earmarked as an investment destination.
This whole thing ultimately affects developer happiness. This policy is a red flag. If you are cornered in terms of money, you will accept to hold red flags. But this will make you suffer in the long run as an individual.