I feel much better spending my money on Apple products trusting it will be supported for a long time than spending it on another device where I will be lucky to have support for more than 2 years.
I would say Apple’s bread and butter is creating an ecosystem of hardware and software that works so well together that choosing to leave their environment is such a hard decision that it is easier to stick with Apple.
The lifespan of much of Apple's hardware is considerably longer than most competitors' products. This is especially true with phones. I'm using an iPhone 7 right now, which was first released in Sept 2016. So, five full years and counting, and it's still running the latest iOS version. Not just "still gets security updates" on an old OS, but actually runs the latest release.
For hardware in 2022, that's not bad.
Personally, I think it's kind of a low bar, and we really ought to be able to do better. (I think a 5-year lifespan for a phone or a laptop, and 10 for a desktop, should be a starting point.)
Apple seems overly aggressive about breaking compatibility on iOS; as a result tons of apps break every year. This imposes an ongoing burden of maintenance costs onto developers, and many games and apps are simply abandoned. It seems to me that saving Apple time and money at the expense of developers and users may be the wrong trade-off in the long run.
And that's not even counting the 32-bit apocalypse which broke most games on iOS and macOS. "This app needs to be updated" but of course it never will be... Many of them have been pulled from the app store as well.
Windows does fairly well in terms of ongoing compatibility on the desktop, and (non-phone) gaming handhelds rarely break compatibility with old software (consider the 3DS which went through 5 or more hardware revisions and many firmware updates with negligible game/app breakage.) The few things that tend to break over time are online multiplayer games when they pull the plug on the servers, or streaming apps like Youtube or Netflix.