While the deal’s collapse could be seen as a loss for the company, it was a winner for its stock price.