This is in big part due to them having bigger caches than some server CPUs.
From what I can tell, while cache is still a large portion of the area, GPU die space is quite large now. The CPU performance seems to be due to expanded execution ports leading to more dispatched instructions per cycle, which is generally a good idea as long as one can keep the execution ports fed with a good amount of speculation in other stages of the pipeline.
But yeah, the SoC in the iPhone 5S was crazy fast at the time, plus they have other advantages like Secure Enclave, and a smartwatch with ACTUAL all day battery life. I owned a Sony phone with a Snapdragon 810, which was Qualcomm's first high-end 64-bit chip... and it overheated at the drop of a hat. The phone was more or less unusable in Australian summer. Everything I read at the time indicated that Apple really caught the rest of the industry off guard.
Even Wikipedia puts it pretty bluntly:
"The first 64-bit SoCs, the Snapdragon 808 and 810, were rushed to market using generic Cortex-A57 and Cortex-A53 cores and suffered from overheating problems and throttling, particularly the 810, which led Samsung to stop using Snapdragon for its Galaxy S6 flagship phone."