If you didn’t read the article, here are more details for context:
She was supporting her accommodation by doing chores in exchange for staying with a host family. Generally you are not supposed to work or earn income while on a tourist visa. So it might have been a case where border control interpreted it as she was basically working to support herself. I don’t know the exact definition of work in immigration law, especially if there is no monetary compensation. Having said that, she was already paying for her accommodation that way before, which means she was able to enter previously either because it wasn’t asked, she explained it differently, or simply a different interpretation by the border officer if she did provide the same details.
It still doesn’t excuse the horrible treatment of people in detention though. She should’ve just been turned back and allowed to go home to the UK (since the Canadian side of the border didn’t want her to go back without going through US customs).