As mentioned by others, it's because of compliance headaches with payroll in foreign countries. Next time this happens, I would recommend suggesting to them that you work as a contractor on 1099. In that case, it's a way more straightforward process for the employer because they just need to send you money, and you handle all the compliance paperwork on your side. In fact it's even easier for them than hiring a US employee.