Flop≠Niche
Apple won't release a device if it isn't profitable to sell. And they won't produce so many that they are sitting in warehouses collecting dust. They understand supply/demand in the mobile space better than any other company. It will make money. It will grab attention and make headlines. It will appeal to enthusiasts, influencers, jetsetters, and mobile professionals--increasing the form-factor's visibility worldwide. That's not a flop. Sure, it's niche. And that's the point.
If you capture every niche market by diversifying your product offerings, you catch all the customers that would have a potential reason to go to a competitor (Android). The alternative is you only make phones that are good for 80% of the people, 80% of the time (to quote Andy Ihnatko). And then you lose customers left and right. So, Apple... make a fold, make a flip, make an air, make a mini, make a nano, make all the phones. They aren't flops just because they don't outsell the iPhone Pro. They are strategic tentpoles in a family of devices.