It was all about access to capital in order to finance the increase in stores and entry into new markets. Of course, it comes with the downside of demand by the market to hit quarterly numbers, leading to the decisions you've decried here. It was the ultimate siren song and now it seems they're about to hit the rocks.
The laser focus on share price to the exclusion of everything else is what happens when there is no way to earn a reasonable rate on one’s money anywhere other than in the equities market.