Imported workers are just fine, even though that is not something you'd derive from many a campaign speech, particularly for specialist workers as vaguely defined by the H1B system which have an indirect benefit of adding a bit of brain-drain friction to potentially competing companies in other economies, as well as shoring up the effect of temporary local skills deficiencies.
But work being done in non-American jurisdictions where the regulatory demands of other governments might affect how an American company can gouge out a profit is what causes upset. That and other regulatory demands suggesting SM companies make effort to crack down on some of the “free to speak hate” problems, which the current powers-that-be that side of the pond don't actually see as problems. Or simply that work being done elsewhere is money going into someone else's economy ‑ while many H1B workers will be sending some money back to family elsewhere, they won't be sending most of it as they need to clothe themselves, eat, pay rent, have a few luxuries, etc.