You linked an article about fiduciary responsibility, and that's also a legal obligation. If I'm an executive and I route contracts to a vendor that I own for personal gain, then the shareholders can sue me and I will lose. The state will likewise enforce that judgment, if necessary with physical force.
If I'm an executive and I choose to spend too much money (in someone's opinion) auditing a git hosting site for malware, then the possibility that I'll get sued for that and lose is zero. That's the "business judgment rule", which is a legal term of art that you can search. The shareholders might fire me, but only in the same way they could fire me for anything.
The financial incentives are obviously as you say, but the difference between "things I do because the state will physically punish me if I don't" and "things I do because I want a high-paying job" is valuable to me. I could probably make more money than I do now if I worked for a payday lender or an online casino, but I don't think that obligates me to do so.