It is not a canard. The purpose of a corporation is going to be specified in the corporate charter, and while some corporations are non-profits or have explicit charitable requirements, most have a charter that focuses on maximizing shareholder earnings. Almost no company has a charter that focuses on maximizing taxes paid.
That charter is a binding contract that governs the behavior of the officers of the company and shareholders, when they buy shares of a company, do so with their rights and the obligations of officers encoded in that charter. They are not buying blind -- they are buying into that charter. That is a contract that they expect to be followed.
The idea that a corporation can do whatever it wants and ignore shareholders is a fashionable myth in some lefty circles and has absolutely no basis in reality or corporate law. If you want to found a corporation whose charter is to help the poor, or to provide high paying secure jobs to workers, you can certainly do that, but then it goes in the charter and if a corporate officer were to start turning the company into a for profit venture she could get sued by the shareholders just as an officer turning a for profit company into a non-profit can get sued.
In addition to the legal obligation of abiding by the charter (in the sense that it is a contract and you can get sued for breaching it), most corporate charters are structured in such a way as to allow shareholders certain operational control: to replace board members who they don't believe are acting in their (the shareholder) interest, require shareholder approval for major things like executive pay, issuance of corporate debt, issuance of more stock, etc. This is another way that corporate officers are bound to serve shareholder interests and again these rights are all promised to the shareholder in the charter before they purchase stock, so that a shareholder knows what they are buying and what rights they have.
In addition to the daily operational controls that shareholders exercise, the charter also specifies what is necessary to change it -- usually a shareholder majority of some kind. This means if you displease the shareholders, they will sell your stock, lowering your stock price, allowing a hostile shareholder to buy up the company and throw management out and also rewrite the charter. Maybe even take the company private so they become the sole owner of the entire company. All of that is hanging, like a Damocles sword, over management, forcing management to cater to shareholder preferences.
If you don't like the current shareholder focus -- and there is a case to be made that we are too focused on the shareholder -- then you can go company by company and propose a vote to amend the current charter, assuming you can get the shareholders to agree -- but what you can't do is pretend that the vast majority of corporate charters aren't structured in such a way as to force corporate officers to maximize shareholder value. They are.