Keeping technology parts for repairs/services for 10 year old devices would be challenging. Even for laptops that old, you'll be looking for used/fake parts, and the OEM would've already stopped supporting it.I actually believe that they should support it for 10 years minimum.
Five years of actual upgrades. (After the last day it was sold by any authorized retailer)
And then five years of only security updates and Genius style support. (For 10 years of total support from the last day sold)
***
People who write software should have the same 10 year minimum support requirement.
As for the software part, considering that Apple is actually the leader in the mobile space (even Google cannot support their own Pixel phones that long), Apple doesn't have any motivation to go longer.
I do agree on ~10 years total of security updates, at least for Macs.