If the companies donot foresee big capital expenditure in next few quarters, the cash gets piled up in their accounts.
So, either they use the cash for acquisition or for rewarding shareholders through dividends or share buybacks to maintain return ratios. Buyback is one of the best methods to return investors money
Till the budget of 2019 was announced this return of money was taxfree, however now there is 20% tax on the profits made by the investors.