Just want to add some color here.
Many people have pointed out that Apple screwed up forecasting demand big time. I just want to say if you take a step back, say 2 months before the launch, when arguably all the final production orders leading up to the launch and quarter are finalized, NONE and I say that very confidently, none of the industry reports, analysts or sales signs even within Apple pointed to such huge sales numbers for iPhone 7. Apple also knew that because there was no dramatic change in design - one of the major reasons people upgrade. Combine these two factors and it's easy to underestimate the demand.
One of key things fueling this demand has actually nothing to do with iPhone. The #Uncarrier brought back subsidy-era pricing by free iPhone promo and all other carriers jumped in. Again, if you read analysts reports, nobody actually expected this to happen because carriers were *very* happy living out of the subsidy world since they were enjoying record high profits. So no one had reason to suspect that they would dive right back in this world. What John Legere and co. started soon was copied by others, pehaps as a defensive move. But none of them knew that the response would be this big and backfire them- 4x for T-Mobile and Sprint. (There's a reason why they are now allowing only ONE customers after Sep 15th. They have to find an escape hatch).
Again, I am not saying Apple or T-Mobile is not at fault here, of course they are way off with their numbers. But try to understand that things don't always work as formulas on spreadsheet even for the biggest of the companies and smartest of the people. If they had, the stock market would never have anything called as volatitlity.