"how can perfectly working hardware be used for a longer period of time"
Install Linux on it!
Seriously, they are light weight Linux distributions like Lubuntu and AntiX Linux that run modern browser, office suite (LibreOffice) and games on 10 to 15 years old hardware.