I can sell a 3-4 year old Mac for WAY more than I can a Thinkpad or EliteBook of similar new price.
This is slowly changing. Defenitely not as fast as I think it'd happen, but Mac resale values have dropped quite noticably now that after 5 years it's defenitely the end of OS support for any of the affordable machines. So if you buy a 4y old Mac, you'll have one OS update left.
Now, I know that you'll still get 3 more years of security support and that even without that it'll likely be pretty safe to run machines for even longer - but that's where 3rd party software support comes in. If you want to stay up to date with your software titles (and there's sometimes pretty good reasons for that), you will likely need a pretty recent macOS to run things. Logic by now requires the second to latest macOS, with many others it's usually the third to latest.
This is precisely why I opted for a new Macbook M3 last year, even if a 2nd hand M1 would've been sufficient for my computing needs in terms of horsepower.
Admittedly, it seems to be a bit better with iPhones and iPads. For example, 3rd gen iPad Pros, released in 2025, are supported by iOS 26. So these are still a good 2nd hand purchase.
And fwiw, I plan on getting one of these sort of soon (well, I might actually go for a 4th generation one) and my next phone will very likely be a 2nd hand iPhone, too, simply because I'm just getting sick of Samsung (which I've used for phones and tablets since quite some years by now).