A for-profit corporation has accountability to its shareholders. If you're a shareholder, you can sell your shares. If enough people are willing to sell their shares at a low enough price, someone will come long and buy a majority of the shares and take over the company, maybe liquidating it. If something egregious enough happens, you might even be able to sue the company or the officers for a breach of fiduciary duty. Either way, the way to stay employed is to make money. If you make enough money, purely money-interested people will be willing to buy the shares of those who have other interests for a high price. For-profit corporations have an incentive to be as good as possible at making money.
A not-for-profit theoretically has accountability to the board, who aren't really accountable to anyone. They can be sued, but only if they do an extremely and formally bad job. The only thing that weeds out bad non-profits is donors.
It seems like there needs to be another type of organization, that can have objectives other than making money, where market forces still cause it to do as good a job as possible at that mission.
And who looks out for all of the other stakeholders who don't own shares?
Well, in the US you can have a benefit corporation, or else certification as a "B Corp", which I just learned are different things while googling it to put a link here. Previously my impression was that "B Corp" was a legal status, but that's wrong, it's a certification by a nonprofit. In the US, a benefit corporation has a separate legal status as "a type of for-profit corporate entity whose goals include making a positive impact on society."
Both are kind of a niche thing still. I've seen a few "B Corp" logos among sustainable food companies, like King Arthur flour.
https://en.m.wikipedia.org/wiki/B_Corporation_(certification...