Invest more in R&D and make the products better and cheaper for the customer so they love the brand. Jobs wasn't an idiot. Piles of cash also allow they more freedom for innovation. Also, what gives you the impression they wouldn't be investing their piles of cash and earning more on it than inflation?!?
There's a fundamental difference between Apple back when it was teetering on the brink of bankruptcy and searching under the cushions for spare change, vs the Apple of today who is literally making more money every second than they know what to do with.
I am also willing to bet that if Apple were to invest $100 billion in R&D the next day, you would all turn around and accuse Apple of squandering their spare cash irresponsibly.
I get that share buybacks have a bad rep (not just here) because there have been companies who use it as a means of "raiding the coffers" even as they engage in mass layoffs or start to file for bankruptcy. However, there are a number of situations where this practice makes financial sense for a company who uses it responsibility like Apple.
1) For one, the money in a company does, in a sense, belong to shareholders. Returning that excess cash to shareholders is a responsible way of managing a company's balance sheet, and they can choose to do so via dividends or share buybacks. Apple is a company with a business model that generates more free cash than they know what to do with. Rather than invest that money themselves (and run the risk of being blamed for losing money if that investment goes awry), why not return that cash to shareholders and let them do the investing themselves? They might be able to earn above the prevailing market rate, or they may not, but either way, it's on them, not Apple.
2) Apple is able to do share buybacks because they have relatively light capital expenditure, in part because they are not in the business of offering free services to billions of people with the end goal of monetising via ads. They also outsource a lot of their manufacturing. So less money is needed for plants, equipment and servers.
3) Apple is also not interested in doing large, flashy acquisitions for the sake of buying products, users or garnering headlines. Such a move would likely be more trouble than it is worth due to the challenges involved in assimilating their culture into Apple. Instead, Apple uses M&A to fill asset holes in the form of accessing technology and talent. This lends itself to Apple pursuing smaller deals involving companies with less in the way of thriving business models. For example, they buy a smaller company that makes fingerprint sensors, which they can then replicate across entire product lines, thereby benefiting hundreds of millions of users. This is why a suggestion like "Apple should acquire Netflix" is always met with me rolling my eyes, because it shows a fundamental misunderstanding as to how Apple operates.
In a way, share buybacks also serve to reduce this sort of temptation to engage in flashy but ultimately frivolous acquisitions by limiting the amount of spare cash Apple has on hand.
4) People generally buy shares with the hope that those shares are undervalued relative to their future value. Looking at current trends, I believe Apple will continue to generate even more money in the future. Share buybacks is one way of getting shares back from people who don't believe in Apple's "bright future" and sharing it amongst a smaller number of investors who do believe. The latter won't just get those profits, but a larger share of them as well.
This is the exact opposite of a total lack of vision. Apple is engaging in share buybacks precisely because they are doing well, and because they believe they will continue to do well in the future. and if you believe in Apple, hold on to your shares. If you don't (or simply decide it is time to cash out), sell them.
5) And finally, share buybacks aren't taxed (at least not until the individual sells those shares). So investors get to decide when they want to vest their shares, rather than have it decided for them (as would be the case in dividend payouts).
So yes, a company like Apple should be returning excess cash to investors (either via dividends or stock buyback) rather than hoard that money for itself, and between the two, buybacks make a little more sense due to how US tax laws work.