I have a Moto X; it has the features I like, which is why I got it. My brother has an iPhone 5. I've used it and I like it as well, and can see why others do too. For the sake of bringing a little more balance to the debate, I'll argue for IOS and iPhone.
Yes, the screen is small, but Apple is all about making a functional device that is as small as possible. They like things to be tiny. Their devices, are the thinnest, lightest, etc. A 4" screen on the iPhone serves its needs well, make the phone more pocketable than any other phone, and doesn't cause conflicts between the iPad and iPhone crowds. A device that would be big enough to be "both" doesn't really do either one very well.
I don't think anyone can dispute that the build quality is the best of any phone (save for maybe the HTC One). The Camera is also top-notch, and better than my Moto X.
As far as the OS is concerned, yes, its locked, and you can't put widgets on the homescreens, and you can't put your icons where you want. But its also due to the uniformity of the devices that Apple can distribute system updates to all devices simultaneously. It keeps the OS up to date. Having a clean UI also helps keep the phone feeling snappy, and helps battery life (despite the devices' small battery). And unlike some of the apps I have used on my Android phone, I have hardly ever come across a glitch on the iPhone. There are no half-@$$ed apps, or buggy apps. As they say, "It Just Works". And its true.
I still prefer my Moto X, but if it didn't exist, the iPhone would be near the top of my list. But again, it comes down to what you're looking for. Mabye I'm not as big a "tinkerer" as some of you. I just want my device to work, and do it fast (and in the case of Moto X, have "Touchless Control").