Typically you would only replace them when they (gradually) became annoyingly slow for daily use.
Agreed, I had to upgrade all of of my PowerBooks/MacBooks at some point with RAM and larger HDDs/SSDs.
And my last Apple Laptop is from 2012 and I learned that Apple now drops support by the OS considerably earlier than in the old days (i.e. unecesarily early, most 8-10 year old MacBooks would be perfectly fine for daily use, but now unsafe) - at least that was my impression.
And installing Linux on them is always a mixed bag (fans, trackpad, etc.), even though it sure is better with Intel Macs.