A dedicated NAS may be highly functional but they are often pretty pricey… You often also don’t get a decent resale value on your recently replaced, but perfectly functional, PC.
There are a few reasons that you may want to use an older PC, but the biggest is simply just the act of recycling. If you have a perfectly good PC lying around not doing anything, why would you go out and buy a NAS instead of just putting your old computer to work? Especially because older computers like those are probably going to be more powerful than most NAS devices that you would pick up, it’s really just a no-brainer.
There is also some quite nice 3rd party NAS software to choose from, that also helps make the device quite flexible in terms of functionality.
See https://www.xda-developers.com/how-turn-old-pc-into-nas/