Probably the same kind of people who buy Macs, even though Dell computers do the same thing for a fraction of the cost
Or the people who buy a Mercedes Benz, even though a Hyundai does the same thing for a fraction of the cost.
Of course, while all of these products do generally the same thing, the user experience can be quite different for people who notice this sort of thing.
For example, Apple is very concerned about conveying a touch experience that creates the illusion that the user is interacting directly with elements of the display, so Apple puts a lot of effort into minimizing the lag between touch input and response. For example, the previous generation, the iPhone 5, has half the latency of the fastest Android device. And the iPhone 5s is benchmarking twice as fast as the iPhone 5 for some functions.
For some people, this sort of thing makes a big difference. They may not be able to put their finger on it, but they know that Apple's devices are more enjoyable to use than other devices that do the "same thing," just as a Mercedes is more enjoyable to drive than a Hyundai.
But while you'll spend a great deal more for a Mercedes, you can buy the iPhone 5s at nearly the same price as top-of-the-line competitors. This Apple's big achievement with the iPhone, and Apple continues to reap these huge sales numbers year after year--the ability to deliver a premium quality product at a price that is competitive with the knock-offs.