Earlier quoted context omitted.
Among major companies, Apple did a better job with supporting old devices. Google Nexus devices become completely out of date after 2 years (too slow to run latest software, and too hard to get hardware repair support). Software wise, Apple could have done a better job as the newer version of iOS is indeed bloated and doesn't run well on old devices. On the other side, Microsoft did great job on supporting Windows XP…
My Nexus 4 (released Nov 2012) has officially received the Lollipop upgrade and is working very well. I barely have reasons to replace it. Apple does indeed a better job at supporting older devices, however new iOS releases are basically unusable on devices older than 2 years. I have for example a 2-year old iPad 3 and iOS 8 is usable on it, but for iPhone 4S or IPad 2 the upgrade turned usable devices into unusable…
I still have an iPhone4S in a drawer; it's visibly slower than when it was under iOS6 and even compared to a 5S it's night and day, but compared to other middle range android phones that's still decent. Side to side with a Moto G for instance, it's basically the same reactivity, but no one would call the Moto G an unusable device.