They are taxed. They’re just not double taxed.
The corporation pays corporate taxes on the money used for the buyback. The investors taxed are avoided because they haven’t realized their gains. When they eventually sell their shares they pay taxes.
If the company made the money from selling beer, it was triple taxed due to the alcohol tax! Wait, if the customer paid for the beer with earned income, the beer was quadruple taxed. But if he paid for the beer with dividend income, it was quintuple taxed!
In the stepped-up basis case I mentioned, the investor may never pay taxes on the gains.
To be explicit, there is a decision tree where a company can decide whether to have wages increase or profit, then decide what to do with the profit, and the rise of stock buybacks vs. dividends is an answer to the second question, not the first.