Apple at least has a good track record of making newer iOS wirk on hold devices... I think they go back ~5 years? Same cannot be said for most Android devices.
iOS 12.x has continued to get security releases, as recently as 12.4.8 a month ago (https://en.wikipedia.org/wiki/IOS_12#Updates). If you bought a 2014 iPhone 6 in 2018 it's still being maintained today in 2020.
Not everything, look at other laptops and desktop computers.
You have Android and iOS that stick because of this 2 players not competing(they are happy with current market share and Google and Apple are pushing now on other fronts).
With desktop computers we can still replace parts without having to ask approval from someone, we can still install whatever we want and this is because there are more then 2 laptop or desktop suppliers. Also it is not about form factor, yes it is easy to replace parts on a desktop PC but for Apple phones they refuse to give you screens or batteries and they bully people that refurbish parts from broken devices and try to hide repair documentation and software(this is opposite of green)