Disclaimer: this is basically off the top of my head and isn't supported by a lot of "research" and "facts". And no, I'm not sure why those words are in quotations, it just feels right.
I have little experience with Apple's Mac OS, but I can tell you that it's pretty and intuitive, and not all that popular. That's not to say people don't like it, but the number of its users is fairly dwarfed by the number of other OS users (most notably Windows users).
Part of the reason the OS works so well is tight integration with the hardware, which Apple also makes. In the past, Apple reportedly toyed with the idea of making its OS compatible with other hardware but abandoned the idea. This could be chalked up to business sense, as Apple may have felt they would lose out on hardware sales by making their OS available in this way. They may have foreseen a major issue with software compatibility. Or perhaps Apple didn't want to lose some of the inherent control that comes with making both hardware and OS.
Contrast this with Microsoft, who in the beginning, was only in the software business. Microsoft was eager for their OS to be adopted by as many hardware makers as possible. Having accomplished that, it can be said that Windows has shortcomings in functionality and reliability for the sake of general compatibility. The result? Nearly every personal computer is designed to run Windows even if it isn't pre-installed, which it usually is. Equipped with Intel processors, even Apple hardware can now run Windows OS natively. Whereas Mac, unless you want to do some legally-grey-area hacking, still only runs on Apple computers.
Of course, the Mac vs. Windows article/blog post/book/rant has already been done. In fact, I've even done it. The point of this post is that I see a similar trend in the mobile phone market, this time involving Apple and Google--with iPhone and Android, respectively.
Apple reportedly worked with Motorola in the early stages of developing the iPhone, but ultimately decided to go it alone in creating both hardware and OS. The result is--not unlike an Apple computer--a beautiful device that's easy to use. But that inherent control is there. If you want a phone with a hardware keyboard, you can't get iOS on a different phone. If you don't like using iOS, you can't get a different OS on iPhone hardware. Apple even seemed initially reluctant to release a software development kit (though they have since done so and a virtual multitude of apps are available).
Enter Android. Google, mainly in the software business (technically the advertising business but the point is they don't make much in the way of hardware), has made Android open-source and customizable, making it possible for Android devices to be available from multiple manufacturers and wireless carriers. There have already been high-profile hardware releases from T-Mobile, Sprint, and Verizon. The only major carrier without an Android phone happens to be the one that exclusively carries the iPhone. But depending on which internet gossip you believe, we may be seeing an AT&T Android phone by Dell or HTC or both before too long.
So, what's the future of the iPhone? When it comes to mp3 players (and music sales), Apple is a dominant force. When it comes to computers, they seem to be more of a niche player. Will the iPhone follow one of these trends? A lot remains to be seen until Apple's contract with AT&T expires. In the meantime, Android is gaining popularity, and history may be repeating.