A retired researcher may still like to keep some unfinished work, maybe as a good hobby. Therefore, I am wondering if it's better to keep a personal web site to keep those previous works such as publications, projects, etc. listed. Isn't it important? Or simply just retired and won't do any old trick?
My university web pages have some still useful material and they get hits. So, the university has decided to keep them up, even though I maintain the content. This is ten years or so after retirement.
But, I also have personal site(s) for various projects. Most of them don't get much traffic, though. The best sites are those that have a stream of useful material, not just old stuff. So, if you keep active in retirement then it is useful both to yourself and others to share that. But to be useful, a website needs to be somehow visible to those who might want it. That might be difficult to arrange. A web search on my true-name turns up the university site (and obits of folks that share that name).
If the university won't keep a person's pages then a personal site might be a useful place just to keep in contact with those you interacted with over the years. But that assumes, I'd guess, that you have new things to offer. I read some blogs of others, for example.
I'm not sure I understand the question, but if you're concerned about keeping your work accessible after retirement, there are good options for doing so without having to actively maintain your own website. Here are a few that come to me off the top of my head.
This is your one-stop-shop for archiving pretty much anything academics do or produce, including
I want to emphasize the datasets, because you really can upload very large datasets on there. They've now partnered with Dryad, which is similar. There's also Figshare, which is also similar, but I don't get the feeling that it's as sustainable as Zenodo.
It's also very good for archiving software. I've linked it to my github account, so that every release of every package I maintain gets a permanent DOI, and is stored on Zenodo.
You can also post manuscripts or class notes here. If it's a published paper, you'll need to check that your publisher will allow a copy to be posted. In certain fields, these are actively used, and so would be more readily searchable than Zenodo.
These are great ways to host code, and increase visibility. It's not clear how long these will be around and hosting your code for free. But for now, these are the de facto sources of open-source code.
Nowadays, people mostly just google for a person's name and some relevant keyword, which would readily take them to any of these sites. If you want a personal site that's just a static page that links to all these things on other sites, that's reasonable, and such a low-cost easy-to-maintain option for your department that they'll generally just leave your site up by default. But honestly, I've almost never gone to someone's site for anything like these things.