Our tax code encourages corporate profits more than reinvestment in the company (including in work force wages).
I am curious about this, and I know you usually know your stuff. Profit, after tax, can be reinvested, or retained, or paid as dividends, or used to pay down debt, or to buy more stock or other acquisition, or usually some combination of the above. I don't have a problem with a company that pays say 30% of AT profit as dividend.
I don't have a problem if they invest in something, usually buying capital equipment is a tax advantage in a sense. It can be amortized against future profits. I think they even cut this to zero years at some point.
Most of CEO pay is stock options/RSUs, and other deferred compensation that can get huge if the company stock price goes up, and upper management salaries are usually not a large fraction of overall salaries, or overall business expense, even though the numbers come out tens of millions often as not.
Companies try and avoid retained a lot of cash on the books as it can make them takeover targets, and today it doesn't pay much of course. Corporate raider types used to prey on "well managed" conservative companies that could be bought up almost with their own cash in effect and then split up and dumped. And with current interest rates, it can make sense to borrow and buy back stock.