IANAL, and the OP should talk to one.
I'm working legally in the US (TN-1), but my wife is here without permission to work (TD-1) (and is not working). When I discussed her options with my immigration lawyer, like maybe should could remote-work for a company back home, my lawyer said (informally) that any work or any income, while in the US, was subject to immigration law. In fact, I was told US immigration's opinion is that when non-US citizens answer work email while on vacation in Hawai'i, it's technically illegal (although obviously everyone happily ignores that in practice).
What a surprise, countries are really no-fooling serious about protecting jobs for their own citizens.
So it's quite possible that in this case, Paypal had no legal alternative.