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?