They are doing the work elsewhere, and it would be suicidal for any economy to mandate only using domestic contractors to do all work. (Also, just a side note, even though logically irrelevant: it's not at all the case that these foreigner+robot combos are taking local jobs; I live in Tokyo and have seen that the convenience stores are desperately seeking staff, even 1 day a week, and paying more for it... they just can't find enough (yes, partly because immigration is pretty difficult here).)