The idealized enterprise value of a firm changes not one whit whether capital is returned to investors via a dividend or a stock buy back. There could conceivably be small differences in transaction costs between the two, but in practice, they’re very similar.
Generally, the enterprise value of large amounts of cash for most firms is less-than-par, because investors fear management making vanity purchases that destroy value. So long term investors are much happier if capital is returned, and much happier if the method of return is via stock buy back.
If you've got mountains of free cash, there are a lot more exciting opportunities out there. You can afford to make higher-risk/higher-reward investments. You can buffer yourself from that next surprise recall/product failure/fulfillment problem. You can make sure you have a stake in anything that looks like it could someday be an existential threat.
There’s a reason (many) successful companies don’t just go off and become massive conglomerates attempting to pursue every idea any executive has.
Areas where the board feels it has a competitive advantage, an investment opportunity, and enough management capacity to oversee the new investment are not, in fact, dime a dozen.
The principal agent problem is real and relevant for every organization of any size.
Anyone targeting a specific PE for a company will sell the stock to counter the increase as the cash balance (and PE) decreases.