The reason most people invest money in public companies is because they expect to get money back at some point. Otherwise, why invest at all?
There are two primary ways that companies can return money to shareholders: dividends and stock buybacks. Financially, the two are exactly equivalent. Tax-wise, they're mostly equivalent (there are a few exceptions around the edges). When a company issues a dividend, all the stockholders end up with a bit less equity and a bit more cash. Many stockholders would rather decide whether they value the cash or the equity more, which is why buybacks are attractive. In a buyback, you get to decide whether you value equity, in which case you keep your stock, or cash, in which case you can sell it back.