I'm my personal opinion a phones internal hardware is best built to run the firmware it's originally launched / released with.
However the phone can then go onto run new incremental updates and the next couple of major updates comfortably.
After that the hardware i.e chipset etc could either struggle or not run certain new features.
After 5 years the capacity of the battery in the phone would be more depleted and would probably struggle running the new software and the hardware i.e chip may struggle so even having the battery replaced wouldn't always help.
Thjs is why in my own personal opinion why the phones recieve limited major updates.