You're referring to what's called an "employer of record" (EOR) and this isn't as straightforward or risk-free as you think it is.
First, there are some countries in which the law would consider your business to be the employer of a worker even if the worker was hired by an EOR. And others place limits on EOR relationships, such as the length of time a worker can be continuously employed by an EOR.
Second, an individual you employ through an EOR can still take actions that potentially expose your business to risk. Think data breaches, intellectual property theft, etc. In many legal matters, since you are not the employer, you would not even have the ability to take direct action against the worker and would instead have to have the EOR act on your behalf, which is of course another source of counterparty risk.
Finally, your relationship with the EOR is not a one-way street as you seem to think ("the local firm will have to face the consequences"). Under any EOR contract, your business has obligations to the EOR as well and a reputable EOR is actually probably far more likely than an average employee to go after you in your home country if you breach the contract.
As an expat who has done business in numerous countries, I offer the following blanket advice: never do business (in any shape or form) in a country where you're not capable of and prepared to get your hands dirty locally (with the legal system, etc.).
> All those cases can be dealt with by the foreign company who knows the local laws and customs.
I haven't seen it mentioned here but while in many cases you can as an employer outsource payroll and labor law compliance, you can never completely shed the potential liabilities that come with employing someone and this can get complicated when your workforce is based in different countries.
There are a lot of things that can go wrong. Your payroll/compliance vendor could screw the pooch. Your foreign-based employee could do something negligent or malicious that leaves you in a legal bind where your costs of protecting your interests skyrocket. And your employment of an individual in certain countries could subject you to laws and taxes you never even knew about.
Of course, a growing number of companies do employ remote workers around the world but it's really not as simple as "I can hire anyone in any country as long as they are talented". The world simply isn't that flat.
First, there are some countries in which the law would consider your business to be the employer of a worker even if the worker was hired by an EOR. And others place limits on EOR relationships, such as the length of time a worker can be continuously employed by an EOR.
Second, an individual you employ through an EOR can still take actions that potentially expose your business to risk. Think data breaches, intellectual property theft, etc. In many legal matters, since you are not the employer, you would not even have the ability to take direct action against the worker and would instead have to have the EOR act on your behalf, which is of course another source of counterparty risk.
Finally, your relationship with the EOR is not a one-way street as you seem to think ("the local firm will have to face the consequences"). Under any EOR contract, your business has obligations to the EOR as well and a reputable EOR is actually probably far more likely than an average employee to go after you in your home country if you breach the contract.
As an expat who has done business in numerous countries, I offer the following blanket advice: never do business (in any shape or form) in a country where you're not capable of and prepared to get your hands dirty locally (with the legal system, etc.).