It's because Apple has to look only over its iPhone models, which are less in number.
Also iOS is more efficient (runs well on old hardware).
And Google also had claimed that KitKat will support low-on hardware devices well, and it does.
But the problem with Galaxy Nexus is that Texas Instruments, its SoC manufacturer has discontinued SoCs and probably even supporting them, so Google had to discontinue software support for it, because the SoC manufacturer has an important role in an Android upgrade. It approves the software and also provides some essential drivers, and that wasn't obtained in the case of Galaxy Nexus, so it didn't get an official update from Google.
If you are interested in running Android 4.4 on your GNexus you can look to custom ROMs like CyanogenMod, OmniRom, Paranoid Android etc. This will require you to unlock bootloader and root your phone.