Lots of replies related to the IT side but none (so far) has touched the real issue here.
Companies are not always the bad guys in this context.
There are several risks related to an employee, with a work contract from country A (non expatriate or similar) simply moving to country B and working from there.
a few of those listed below
A) Corporate tax risk (risk for corporate)
An employee working in a 3rd country could establish a Permanent Establishment (PE) as per OECD Model Tax Convention. Trust me, this is a bitch and the most serious issue from an employer perspective. The employee working abroad and generating revenue suddenly might create a corporate tax liability in the country where the work was performed. In worst case, this could even lead to double taxation on those revenues. Lots of details around this - google PE and have fun.
B) Immigration (risk for employee and potentially corporate)
If you want to work in a country, usually you have to have the right paperwork. The responsability lies with the individual performing the work but also with the employers who is often legally responsible for ensuring their employees have the appropriate documents to work and someone with Legal/HR can produce the proof in case of an audit. If you get caught, there might be criminal liability besides fines and deportation of the employee. Furthermore, the company might lose access to future visa sponsorship for this country.
C) Income Tax and Social Security (risk for employee and corporate)
Lots of specific rules & regulations here. There might be withholding requirements for the employer, there might be reporting requirements and all of them connected with days the employee spend in a country and / or has family connections to. Lack of compliance might trigger penalties, audits and other unpleasant interest from authorities.
Social security is as complex and to make it more fun, is following a separate set of rules. Depending on various combinations, both employee and employer might be responsible for social security taxes/contributions in the home country, host country, or both.
D) Employee Rights (risk for corporate)
An employee working in a host country even for a limited period of time will almost always acquire local mandatory employment rights, sometimes from the first day of employment in the country. Most of the times, those rights are acquired automatically and cannot be contracted out or derogated from.
As examples of those you can think of:
- Termination rights (e.g. notice periods and severance pay based on statutory laws)
- vacation allowances (min days, maternity/paternity leaves, working hour caps, etc)
- min pay levels
- health and safety protection rights
Furthermore, to make it more complicated, contractual clauses signed by employee and employer in home country might no longer be enforceable and/or even legal, like post termination non-compete clauses without a monetary payment are mostly void in France, Germany or Italy.
E) Employee Benefit Plans (risk for employee and corporate)
Lets not start discussion on things like LTIs, health care plans, pension and retirement plans, equity plans - all a hot mess of jurisdictions allowing one thing here, prohibiting or enfocring the same thing somewhere else.
F) Data Security (risk for corporate)
You might be working on something, where access to data is geographically restricted - even with you not knowing it. Contractual breaches might be very costly for the employer.
There is probably more and the topic is an endless source of income to many advisory companies. I can only speak from experience, that even with corporate support sometimes you get wound up in global treaties where solutions are costly and take years to solve.
Do I recommend not to do it - definitely go for it. However, on reddit people tend to be very unilaterally against everything corporate and I just wanted to offer a glimpse of reality as of why employers sometimes try to restrict the free movement of employees.