Why? 7 years is a very limited duration, i would personally advocate for (at the very least) twice that, and not just for security updates but also for hardware warranty.
It would push hardware manufacturers to produce good reliable hardware instead of 10 crappy new phones every year, and to partner with reliable systems developers/vendors instead of pushing their own broken-in-1000-ways Androids.
None of the governments business in the first place. 14 years would mean the original iphone is being updated. There would be like 4 people still using it.
The Playstation2 was produced for 13 years, Xbox360 for 11 years. The CPU I am having in my PC is 10 years old already as well. Long lifespan is not exactly impossible in tech.
Also bringing up the original iPhone is a strawman, as that's not going to be supported by this law any more than it is today, newly released phones however are. And since technological progression has slowed down a lot in the last few years that really shouldn't be that hard.
> People don't carry game consoles around in their pockets all day
No, but most people also don't need SoCs which performance doubles every 2 years. If the software was properly written and optimised (which would be more common if the firmware developers expected the hardware to have a long lifespan), there would be no reason any phone manufactured in the last 7 years to be sluggish. Anyway most people just want their basic apps to work (e.g. phone, emails, whatsapp, agenda, hotel booking, photos, maps, chat, music player, etc.), none of which should require a very powerful CPU or tons of RAM...
I'd also argue that lack of software support has got to be one of the primary reasons phones get refreshed at the rate they do. I keep my phones until the vendor stops shipping software updates. If today's iOS remained compatible with past devices, I'd probably still be using my iPhone 3. There's no reason it doesn't have to, either. Apple and other phone vendors deliberately choose to drop software support for hardware they consider "too old".
Indeed, but smartphone HW is much more mature nowadays and even the cheaper smartphone can do what most people need from a device like that. So, expecting a device released in 2021 to last 10 or even 15 years and still be useful it's not that weird (beside storage losing speed, maybe). 10 years for a device from 2012 OTOH would be completely impossible.
At a certain point it's probably cheaper to give these people new phones then it is to update their software. (Ignoring the incentives this would create, of course)