Apple's support window advantage long predates their services initiative.
Every flagship iPhone since the iPhone 4s in 2011 has gotten at least five years of OS and security updates.
If you count years where you only get a security update, but not an OS update the way the Android ecosystem does, they have devices that have gotten eight years of support.
However, the claim made was that Apple only started offering a longer update period after they started calling out service growth. This simply isn't true.
Not to mention the ability of any company to make demands of their suppliers. If Google can demand device makers not use a fork of Android, they can demand suppliers offer support for their products.
Google simply doesn't care, because the customers they care about are the advertisers, not device purchasers.
Also there's an upper-bound on price for an iPhone Apple is able to charge and if I can speculate, the "Pro" lineup does not outsell the "base" iPhone significantly. For one, there isn't enough product differentiation for an average consumer to pay the $300/40% price premium.
So in the world of 3-4 year iPhone cycles, keeping up the walled garden and monetizing those within is the surest path to revenue growth.
What is altruistic in this world? Government welfare? parental love? I don't know of anything that is truly altruistic.
Android meanwhile supports 32 and 64 bit, multiple instruction sets, multiple (incompatible) SOCs etc. That is a lot more challenging.
The iPhone with the oldest version of a 64 bit processor (the A7 used in the 2013 iPhone 5s) fell out of support after six years because it no longer had enough RAM for the new version of the OS.
Android OEM are incentivized to sell as many phones as they can. They only make money on new hardware. Apple on the other hand still makes money on older hardware as long as the user still buy from the ecosystem. So it makes sense for them to keep the products working longer.