For example, I have an old iPad2 (last Apple device I bought) that is working perfectly (the hardware). But I'm not able to install anything "new" on it because iOS 9 is no more supported by applications. Why Apple doesn't open specifications so i can install Linux on it to extends its life for many years to come?
I take an example from Apple but it's applicable to ANY companies.
How long is it reasonable?
One of the reasons I have heard about people buying Apple hardware is that it has great resale value.
So the answer is: Long enough to keep this true.
If Apple keeps its current path, people will stop buying Apple hardware and it will hurt Apple's bottom line.
But yes, I concede they have the money to make mistakes for about 20 years. So they do make the mistakes.
In this case, they bothered to make this thing with decent build quality and for that I thank them. It is even easily upgradable and the battery is accessable.
However, if I want dev tools to work on it, Apple requires me to use their recent OS, which they claim will not run on this hardware.
Now if they had a good point economically and it was a massive ballache requiring a lot of resources, then fair enough. But the patching utility appears to be the work of one person in their spare time, which in the grand scheme of things, especially since Apple is hardly strapped for cash and resources, does look like Apple have decided to economically obsolete this machine for reasons that have very little to do with it being technically obsolete.
That's why I put more ram in it.
Sandy Bridge laptops are not supported by Mojave and up, but will probably be softwarematically fine while continuing to get more features while running the latest versions of Linux or Windows. Amazing technologies like changing your wallpaper over the course of the day (GNOME in the '00s onward) or making your screen yellow are all supposedly not functional on macOS on those Sandy Bridge laptops.