Yes, you can certainly use old computers for basic functions.
I have a 2012 mini that is our home server, primarily running Plex Media Server and transcoding multiple 1080p streams simultaneously. Barring hardware failure, I don't see any reason why this mini can't continue for another several years performing as it does now. Transcoding, as you may be aware, is not exactly a "basic" function; it is quite CPU-intensive. Granted, it is not very GPU-intensive.
I'm certainly not arguing that you could use the 2012 mini with Bootcamp to run 2018 games with any level of graphical fidelity (or at all, in some cases). But a blanket "computers don't last more than five years," or even a more particular "they can be used only for basic functions," is simply not accurate.
As far as a gaming system, my 2009 Mac Pro that I alluded to in my prior post has had its CPU, RAM, and video card upgraded for several thousand dollars less than it would have cost me to replace the whole system. Will it run 2018 games at max graphics? Probably not. Will it run them at all? Probably, and in a lot of cases, with at least a decent experience. (That said, the games I tend to play aren't blockbuster GPU-killing things. But my husband is running a GTX 1070, and he does play those kinds of games, and he tends to want to be able to max graphics settings, and I haven't heard any complaints from him recently.)
And if I can't max graphics then I need an upgrade.
That's certainly
an opinion. There's a far cry between meeting minimum requirements (or exceeding them comfortably to have a decent experience) and having to be able to max everything out. Anyway, what you are talking about is a particular use case that does not age well. Gaming, however, is not the only non-"basic" function that a computer can perform.