I don't think they spend any real time optimizing for old hardware, for example APFS is just a turd on HDD systems and yet they forced everyone on it and worse yet kept selling HDD iMacs on the low end (which really wasn't that low).
Meanwhile MS announces in advance what the support window will be. With Windows 10 there was barely any difference in requirements from Windows 8 so pretty much everything that wasn't a bottom tier netbook or tablet from 2010 still works fine and is supported until 2025. Meanwhile the 2013 Mac Pro which was an expensive beast and sold until late 2019 won't even get some security updates in 2025.
Linux and the BSDs also announce ahead of time the support period and there's a plethora of options for aging hardware.
Nearly all machines, DIY included, would have met these requirements. Intel PTT has been built into their processors since 2013. AMD for at least a few years.
Hardware as high quality as Apple is harder to come by though, and generally commands the same price premium.
Maybe it's different now (I haven't used Windows in decades, so I don't know) but I will say that it never felt that way to me. Perhaps because Apple controls the OS and the hardware, and has the ability to either spend extra time optimizing for older known hardware that falls within a support window or to delay a feature that would be problematic for older-but-supported hardware, but my lived experience with Apple hardware is that I get a lot more practical longevity out of it without having to work to squeeze every last drop of performance out of it.
Yes, I can always take a $1200 Windows machine and put XFCE or Xubuntu or Mate on it and it'll extend its life considerably, but as someone who has always tried to extend the life of my components as long as possible (the server at my feet is an Athlon FX) -- it's always just felt easier on Apple hardware.
It's even easier still with non-Windows PC operating systems, but ... has Windows gotten better on this regard or is that longevity still bolstered by migrating away from Windows?