Buybacks are optimal when your share price is undervalued or when the Business has plateaued, which is commonly done for value stocks. In which case Buybacks becomes the best way to return value to share holders by purchasing under valued shares of themselves, trading their excess capital to reduce the supply of company shares that also improves dividend yield given its paid out to fewer outstanding shares.
It's the optimal way to return value to share holders when your share price is undervalued and you have excess capital. If the company ever needs to raise funds for a strategic M&A investment in the future they're always able to resell their shares again.
Some companies are content with maintaining a healthy business and not go after growth at all costs, which is a totally fine operating strategy.