This logic would apply if you were a board member or you held a significant number of voting shares.
As an employee, your role is to do what the board and shareholders want you to do.
As an employee, you will be replaced should you rock the boat or affect their bottom line.
But engineers are not commodities, thus we spend 2, 3, or 4 interview sessions going over silly algorithmic puzzles, so companies can figure out if we're great, or if we suck.
That's the opposite of a commodity.
US for-profit (non-bank, non-insurance, non-investor bund) companies, unlike European ones, are not legally required to maximise profits unless they are insolvent. Primary reason for short-time profit drive is investor pressure. The most important fiduciary duty is business competence. The right to reap profits is given in exchange for that.