But if the quality is so bad that people die, or are maimed, poisoned, or otherwise injured, we have different rules. Consumers aren't good at this, they aren't experts, they don't have the right information. So they turn to regulation (or certification - a voluntary form of regulation). These ethical factors are, of course, a trade-off with the others. Sweatshops and child labor are immoral, we will not tolerate that.
You bring up the interesting point of transition, though. If we stop buying these masks, those people lose their opportunities, and we run the risk that they'll just be produced in some other sweatshop somewhere. As such I am a big fan of transitionary programs with auditing, where if bad conditions are found, the owners are incentivized to make gradual improvements or risk losing customers.