It boggles the mind that the biggest companies on Earth are the likes of Instagram instead of a huge company called "Adapt" which takes care of all that between employee and employer as a third party.
I have no personal experience but I have been told that even if you farm a lot of things out there is a certain amount of paperwork (and cost) that you have to handle in-house.
Right now, if N companies want to hire in M countries, the total expenditure in HR departments is in the order of O(N*M), when it could (theoretically, ideally) be O(N + M).