Executives have compensation tied to stock price. If the stock price goes down because nobody wants to invest in a bad company, those executives have incentive to become change their ways.
That compensation incentive is also why executives are so short term thinking nowadays.
The stock market is part popularity contest but it's a lot more complicated than simple statements.