With a lot of Android devices they'll have a lifespan even beyond that. Although there are choices to make at that point. You just don't have the option with Apple.
[0] https://endoflife.date/iphone [1] https://endoflife.date/pixel
Apple makes no such guarantees, so it's not something anyone can depend on.
Beyond that, there's no guarantee Apple continues to support for 7 years. They are literally the same level of corporate greed as Google.
Also... Apple has locked all of their users into planned obsolescence for a decade plus. At least their is hope on the slightly more open side with AOSP.
Apple is a poster child of nothing. They have put out hardware that is inaccessible and unrepairable for years. Both companies suck to their end users, let's not pretend Apple is some utopia of awesome to their customers.