It does violate the letter of the law. B1 visa is only for training, meetings, conferences, etc, if you work remotely for an U.S. company you're not supposed to work while there, only training and meetings. Not sure if you work for a foreign entity (maybe Facebook Ireland is a separate, foreign entity for B1 visa purposes, and maybe they're being paid by an Ukranian entity in Ukrania). B2 is the tourism visa, so definitely no work, but most people get a dual B1/B2 visa.
Edit: apparently the key part is "no salary/income from a U.S. based source". So maybe they're in the right.
In practice, if they're only staying for a few months I don't know if USCIS will care, unless they get caught red-handed.
I wouldn't want to argue with USCIS about the letter of the law though, they'll deport first, ask questions later.
https://travel.state.gov/content/dam/visas/BusinessVisa%20Pu...