Why do people think that if you pour more money into something like R&D you'll get more results? That isn't how it works. You get diminishing returns on anything, do you not think internal statisticians and economists at the company haven't calculated that?
Sometimes it's about timelines, not sheer ROI. Apple is in a position to make long term R&D bets because they don't face the same board pressure that many other companies do.
Also, it's not only R&D. Long term capital outlays like building new factories are also something that buybacks compete against, and some companies like Telsa do the opposite: Raise more from the capital markets and invest in long term spending in both R&D and capital outlays.
Looking at the system as a whole, though, board pressure aside, we should want companies like Tesla raising cash for longterm spending while other companies issue share buybacks or dividends.