Suppose you're a US company and you want to hire a guy in Palombia to do coding for you.
You may try to structure the deal such that -- according to the American law you're used to -- it is just you buying a service from a foreign one-man business. However, Palombian law may not agree with that.
For all you know, hiring the guy may well make you a Palombian employer in the view of Palombian courts. And the opinion of those courts is what counts if the guy sues you for holiday pay, or sick pay, or severance, or mandatory cost-of-living raises, or demands to be re-hired with triple back pay a year after you lay him off in a way that turns out to be illegal in Palombia. There's no telling which strange (to you) laws they may have there!
Most probably you can't get out of that just by writing in your contract that no such things will apply, or by a choice-of-law provision saying that California law will govern. If Palombia is like most countries, their labor laws take precedence over private contracts.
What's more, being a Palombian employer most probably means that you're legally required to withhold income tax from what you pay the guy, and remit that to the Palombian government. To do this you need to integrate with their IT systems. Or contract with a Palombian payroll processing company to do it for you. Perhaps you'll need to post a bond to secure the tax withholdings; stranger things have happened. And there may be all kinds of mandatory social contributions other than tax you need to pay, which according to Palombian law are in addition to the salary you agreed on, so you can not even deduct it there. Did you remember to register for the Palombian Employers Bankruptcy Guarantee Fund?
All of this may or may not be as bad in practice. But you never know until you pay someone to research it for you. Don't take the guy's word for it. He just wants a job, and he may not even be aware that the Palombian Employers Bankruptcy Guarantee Fund exists anyway. That won't help you when you're hit with a $20,000 fine for not contributing to it.
So you're looking at some unknown sum you'll need to pay some Palombian employment lawyer just to get up to speed on whether there'll be any hidden costs or risks in hiring the guy or not.
If you can hire someone just as good in a jurisdiction where you already know how to employ people, that's much cheaper and safer.