Google's John Mueller said that some old links to old websites may be irrelevant links, at least from a Google Search and ranking perspective. Keep in mind, John hates when I or others take specific responses to specific questions and then generalize that as the standard answer.
John was asked about an old website that had a lot of pages that are now 404ed that had a lot of links to them. John said on Twitter "Depending on how old that website is, there's a good chance these links are irrelevant and wouldn't change much."
John added that if you do see those links sending traffic, you might want to 301 them to new URLs. He said "if you see a lot of traffic (users, crawlers) to the 404 pages from there, I'd pick a new URL on your site and 301 redirect to there."
Here are those tweets in context:
Depending on how old that website is, there's a good chance these links are irrelevant and wouldn't change much. If you see a lot of traffic (users, crawlers) to the 404 pages from there, I'd pick a new URL on your site and 301 redirect to there.
— 🦇 johnmu: cats are not people 🦇 (@JohnMu) October 25, 2022
And no, 404s are not bad:
No, having 404s is not a signal for quality. Every website has 404s. That's expected when a page no longer exists.
— 🦇 johnmu: cats are not people 🦇 (@JohnMu) October 25, 2022
Why do these links that were 404ed become irrelevant? Well, 404ed links aren't counted and Google will eventually learn to ignore them over time. If it has been a lot of time, then Google will ignore them.
Why then does John recommend to 301 redirect those links that still get traffic? Well, if the pages still get traffic, it is possible Google might recrawl them through new links and then discover the page no longer 404s but 301s and then the link might come back to life. I assume it is rare but it can happen.
Forum discussion at Twitter.