Ultimately, what matters to shareholders is the value of their shares. The company should be managed so as to benefit the shareholders.
There are various reasons why profit is not a good measure of the benefit to shareholders. For example, profits from year to year can be manipulated. Also, a company could maybe generate more profit by borrowing money at a lower rate than they can earn from the assets in which the money can be invested – however, borrowing makes things more risky for the shareholders and could therefore result in a lower share price, which is not good for the shareholders.