Analogy: though I've always been an atheist, the cultural conditioning is so strong, that in my 20's it took me a LOT of conscious effort to consider the notion that "Religion should not be treated specially" (when it comes to e.g. tax breaks, protection, freedom of speech, etc).
On this too then, I've been strongly conditioned that "company's only prerogative is and should be shareholder value", that it took me a lot of effort to consider it critically, but... it's just a sentence, a statement. It's no more true than we desire it to be.
Or to put it another way - if company's ONLY priority is shareholder value, over consumer interest, employee well-being, external impact, and long term picture... the system is as broken as the more aggressive amongst us have banged the drums it to be.
There is a generalized "duty of care" requirement in most jurisdictions, but it can be and often is interpreted much more widely than a requirement to maximize shareholder returns.