Speaking for myself: a combination of ease of use, features, quality and a mature ecosystem. They certainly don't have a perfect track record in any of these, QA being a well-documented example in the last few years. And the alternatives have gotten better, but they're still not good enough to convince me to switch.
iPhones have better hardware/software integration, which is easy for Apple to do because they control everything. They get better performance out of their hardware because of this.