There are many different theories on 404 pages and whether or not they affect your websites SEO. Some people will recommend:
Our opinion on this is the last of the above options. We believe that sometimes there are benefits in letting pages 404, for both users and search engines. It also does always make sense to just 301 redirect all 404 pages on your site, it does not seem natural to either your website’s users or search engines. But this does emphasise the importance of having a great, intuitive 404 page.
We believe that it is ok to let your website 404 unless the page receives:
So to summarise, 404 pages are not necessarily bad for SEO and there are cases where you should just let pages 404 as opposed to 301 redirecting them to other pages.