I'm not sure that's true. The B-1 forbids most work, including "construction", but there's a special set of rules for installing equipment sold by your foreign employer:
https://travel.state.gov/content/dam/visas/BusinessVisa%20Pu...
Many of those detained were employees of Hyundai's equipment vendors. A lawyer for some of those employees is alleging they were in fact compliant for that reason:
https://www.reuters.com/business/retail-consumer/lawyer-says...
If the DHS has evidence to the contrary, then it's had a week to disclose that and save some face. That they haven't may imply a significant fraction of those detained in these harsh conditions were in fact lawfully present.