There reason, I propose, is the deviant behavior you describe isn't sustainable. If you do not produce real value for customers in the long run you are not going to produce value for shareholders. You can "cook the books" for a little while. Maybe. But not in the long term.
The title of the this thread names Apple and Google. Both of those companies have produced a huge amount of value for users and customers as well as shareholders.
Maybe I'm being repetitive. If someone invests their money in my business I am going to make it an absolute priority to do well by them. And the only way to do this is to do well by customers. One forces the other. And, BTW, I don't think this is a conscious decision. In other words, I don't think anyone says "Dammit, we need to make shareholder returns a priority...let's focus on customer value". A good company is aware of shareholder value being important yet their focus and driving force is and should be a passion to deliver best in class products and services (understanding that the one will take care of the other).
Are there companies out there who behave badly? Of course. Thankfully they are the exception rather than the rule.