You are right - typically government is responsible for stopping bad behavior. However, in the US especially, there is a widespread feeling that at the highest levels of government where these problems are addressed, the leadership is (take your pick) incompetent, ineffective, captured by lobbying, obstructed, too slow, or otherwise prevented one way or another from doing the right thing. The standard role bearer is broken. That's reason #1.
Corps are often very powerful and influential as well. Why shouldn't they take on a role larger than making money? If I became a corporation, do I get a free pass to be unethical, and commit atrocities as long as it's lawful? No. I would be shunned by society. Corporations seem to have long had a free pass. We should hold all entities to equal ethical standards and expectations, and respond in every way possible both as individuals and governments when those standards are violated. The laws around selling tobacco would never have happened without individual action first. Corporations need ethics too. I rather like it when our corporations follow our morals, I get tired of being cynical. That's reason #2.
Apple and other companies are global entities. Mini-states in their own right in a way. Trillion-dollar companies have enormous, global power. It may be lawful to follow a law in country X when in country Y that same law would be illegal or widely condemned. How is a government supposed to respond to global entities? Say those same tobacco companies sell to minors in another country where it is legal. There's not exactly an established legal precedent as far as I know. Is it still evil to sell to minors? Yes. Legal imbalance exists for global entities, so governments hands are often tied. That's reason #3.
So, nobody is around to motivate Apple and other corps to do the right thing. There should be consequences to abetting abhorrent laws and censorship. Everyone cheered when Apple stood up to the FBI and refused to assist hacking a suspect's phone. Everyone booed when Blizzard and other companies buckled and went along with the CCP censorship. Corps need to be punished for bad behavior (or knowingly working with or for criminals) somehow, and (here's the cynical view) they will only pay attention if it hurts their bottom line.