Companies often buy back stock from shareholders at market rate. The emphasis is placed to improving financial ratios. What this means is the company is able to maintain most of its earnings within the company rather than having it spread out .
Publically traded companies are going to be 'owned' by as many shareholders out there with a share. This is troubling for businesses who don't essentially require the capital at this point in time. Thus, they purchase the shares back from shareholders and keep them on hand until later .
Shares are only purposeful when helping fund growth and expansion. When this stops, the value of having shareholders ends up being equivalent to tossing money away in the eyes of businesses.