I'm not an Apple user, so I couldn't possibly care any less, but like....come on. Maintaining old hardware platforms costs time and money.
"There is no non-evil reason"
The reason is that someone needs to sit down, open up Xcode, and compile it for the old hardware, fix all the compilation issues that crop up, and then that OS needs to be tested on every variation of that hardware that was ever released anywhere in the world.
If you don't want to do that because the userbase is dwindling and you aren't running a charity and/or open source project.....how is that evil??? Cheap, maybe even greedy - but evil??
Also, that hardware may be able to walk the new code, but not run it.
So, you’ll have to choose between cutting some features and releasing underperforming software (likely severely underperforming, for older devices)
Hacking on the code for months or even years may alleviate that somewhat (look at what the hacker scene can get out of computers from the 1980’s), but that isn’t a certainty and if you do that, you either have to release later, or release later for so devices.
Either way, your users won’t be happy. They’ll get less, get it later, and/or it won’t perform.
Calling the dropping of support for any single piece of hardware by any group of people, for-profit or non, open source or closed, "evil" seems pretty dramatic.
If anything fails in your ubuntu install, you'll go and find the answers on Ask Ubuntu or so, whereas people expect their smartphones to "just work" and work consistently without changing driver settings.
That creates test and QA work on Apple's part. They also have a pretty good breakdown how many devices of which build type are still out in the wild - and at some point, it simply becomes uneconomical to still support a given device version.
You aren't wrong to point out that incentives are wrong since we don't pay for the Android/iOS version, so the manufacturer makes more money retiring support early, but IMO Apple is doing a pretty good job here, esp. considering how much smartphones have evolved during that time.
There is a huge difference between a ten-year-old laptop/desktop and a ten-year-old phone—or, more accurately, laptops and desktops have advanced a lot less in the past ten years than phones have.
It would be a much better analogy if you were to say you'd installed the latest Ubuntu on a machine from twenty years ago (though even that may be generous, given that the iPhone was only 4 years old 10 years ago, while the Intel PC was roughly 20 years old 20 years ago)—and I'd expect it to work about as well as iOS 15 would on an iPhone 4.
It'll work if you install a piece of software that changes the device identifier.
You are right though that Apple retires support after 6-7y. That surely could be longer considering how desktop/mobile CPUs have stagnated over the last 5-10y.
It's just unlikely to change given Apple makes no money supporting old computers apart from repairs.
"There is no non-evil reason"
The reason is that someone needs to sit down, open up Xcode, and compile it for the old hardware, fix all the compilation issues that crop up, and then that OS needs to be tested on every variation of that hardware that was ever released anywhere in the world.
If you don't want to do that because the userbase is dwindling and you aren't running a charity and/or open source project.....how is that evil??? Cheap, maybe even greedy - but evil??