Companies don't maximize shareholder value, no matter how much they talk about it.
Companies are run by and for the managers of said company, and what gets them promoted.
Sometimes that aligns with what the shareholders might want, often it does not.