I thought the same until I calculated that newer hardware consumes a few times less energy and for something running 24x7 that adds up quite a bit (I live in Europe, energy is quite expensive).
So my homelab equipment is just 5 years old and it will get replaced in 2-3 years with something even more power efficient.
Asking coz I just did a quick comparison and it seems to depend but for comparison I have a really old AMD Athlon "e" processor (like literally September 2009 is when it came out according to some quick Google search, tho I probably bought it a few months later than that but still ...) that runs at ~45W TDP. In idle conditions, it typically consumes around 10 to 15 watts (internet wisdom, not kill-a-watt-wisdom).
Some napkin math says it would cost me about 40 years worth of amortization to replace this at my current power rates for this system. So why would I replace it? And even with some EU countries' power rates we seem to be at 5-10 years amortization upon replacement. I've been running this motherboard, CPU + RAM combo for ~15 years now it seems, replacing only the hard drives every ~3 years. And the tower it's in is about 25 years old.
Oh I forgot, I think I had to buy two new CR2032 batteries during those years (CMOS battery).
Now granted, this processor can basically do "nothing" in comparison to a current system I might buy. But I also don't need more for what it does.
That is definitely true and why I compared idle watts. That Athlon uses the same idle watts as modern mobile CPUs. So no reason to replace during the mostly idle times. Spot on. I can't have this system off during idle time as it wouldn't come up to fulfill its purpose fast enough when needed and it would be a pain to trigger that anyway (I mean, really, port knocking to start up that system type thing). Else I would. That I do do with the HTPC which has a more modern Intel core i3.
The "nothing" here was exactly meant more for the times when it does have to do something. But even then at 45W TDP, as long as it's able to do what it needs to, then the newer CPUs have no real edge. What they gain in performance due to multi core they loose in being essentially equivalent single core performance for what that machine does: HTPC file serving, email server etc.
So my homelab equipment is just 5 years old and it will get replaced in 2-3 years with something even more power efficient.