Their jobs were most often outsourced by US companies looking to get higher profits from cheaper labor. It would be a lot more effective to solve this by enforcing equivalent, high working standards across the world, rather than blaming Chinese people for desperately needing a job like everyone else. But then profits would be lower, oh no.
Not only would profits be lower (disincentive for companies), Chinese [or other off-shore] employment prospects would be worse (disincentive for them to comply).
Trade makes people better off in general, but it doesn't make every person better off.
If China would make themselves less competitive "by enforcing equivalent, high working standards across the world", they have clear disincentives to enforce compliance.
Oh, yes. That's been used to drive down the standard of living in the US (including within it) forever. That's why competition is bad for labor. The only real escape from the market's race to the bottom is a democratically planned economy IMO.