public companies do not necessarily have a Fiduciary duty to the shareholders, let alone one to increase value. Any that they did have (based on the laws and how they are incorporated in a given jurisdiction) would also be applicable to a private company. Private companies also have shareholders, the shares are just not traded publicly.
You’re probably thinking of the theory of “Shareholder Primacy” but that is a theory not a legal reality, although some insist it is based on a questionable interpretation of the precedent set by dodge vs ford motor company.
Public companies can be run in what ever way the board/shareholders see fit.
passing the market share of windows
…well windows 7 at least.