They have a fiduciary responsibility to the corporation and the shareholders. Increasing salaries to retain talent is part of this responsibility. However it is common for CEOs to mostly focus only on shareholders - mostly because their income mostly comes from shares.
This is why you always hear “they have a fiduciary responsibility to the shareholders “ and nothing else. It greatly lines their own pockets to perpetuate this.