I'm not a fan of Apple's walled garden mindset and resistance to inter-operating with other platforms, but this degree of legacy support is a case of Apple doing a good thing and deserves praise. Note: I'm not saying that Google/MSFT et al are much better than Apple, but they're not quite as bad.
I know folks that have 18-month-old flagship Android phones, that can’t get the latest Android releases.
When they ask me what Android phones to get, I always say a Pixel, because they will at least get the latest OS support in a timely fashion.
They are also excellent phones.