Founder of Pilot here. Thanks for the shout-out!
To answer the OP’s question: it’s perfectly legal for a US company to hire someone outside of the US as a contractor. But, companies are weary of that for a couple of reasons:
1. Worker Classification Risk. When hiring someone in another jurisdiction, either as an employee or a contractor, you have to comply with local labour laws. Some countries have stricter rules about who can be classified as a contractor v. an employee. Others are friendlier towards contracting as an employment model.
Before hiring your first foreign contractor, most companies only have to be concerned with local labour laws in their country. That’s what they know, and that’s what their lawyers have experience with. As soon as you start hiring globally, that’s no longer the case.
For smaller companies, risk of hiring a handful of contractors in different countries is quite small. But the larger you get, the 1) more conservative you become and 2) you become more of a target for local authorities to audit.
Many companies simply choose to play it safe, and stick to hiring people only in the jurisdiction they are familiar with.
2. IP Risk. When you hire someone as an employee, in most jurisdictions any IP they produce while at work automatically belongs to you, the employer. That’s not the case for contractors.
Many companies, rightly so, are worried that by hiring contractors they won’t correctly secure rights to the IP they’re paying for. This is compounded by the fact that some countries have pretty esoteric IP laws, for example prohibiting outright transfer of IP from the contractor to the company and requiring an exclusive license with well-defined terms of use instead.
Again, for many companies, it’s easier to avoid that risk by sticking to hiring domestically.
3. Permanent Establishment Risk. This applies to hiring globally broadly speaking, not just as contractors.
By having permanent team members in other countries, a company can unintentionally create a “permanent establishment” in the country they’re hiring in. The rules here, again, vary from country to country, and it’s rarely the case that by hiring a single contractor somewhere you’d create a permanent establishment for your business, but it’s something you have to worry about.
Why does it matter? Because companies that have a permanent establishment in another country can be subject to taxation for sales made in that country. Have SaaS software you’re selling globally? Well, if you have employees in France, you may have to pay sales tax/VAT in France sooner than you otherwise would.
Platforms like Pilot help companies reduce this risk. Sometimes it’s by improving your compliance when hiring people as contractors (to the extent possible). Other times it’s by acting as the local employer (or employer of record as was pointed out by other commenters in this thread).
The latter allows the company to almost entirely remove the first two risks (at the expense of generally higher costs than the contracting option).
Happy to answer any other questions about hiring/being hired by US companies outside of the US!