Apple buys their own shares back because they believe they’re undervalued, fundamentally. So it's a bargain. There's also only so many profitable R&D projects they can invest in, and the rest of the money can be better allocated by the market. This is all finance 101 that Tim Cook is familiar with.
Stock buybacks are a stupid idea for airlines (high fixed costs, heavily economy-dependent cash flow), but a fantastic idea for Apple.