Currently, there are numerous websites which have invalid code but still work fine thankfully due to the latest browsers that automatically correct most of the minor errors in the bad code. It can be said that it is not compulsory for the code to be perfect however it should also not have grammatical errors which will damage the original functioning of the website.
Therefore it still makes sense in having a list of websites with bad code which can be rectified by the browsers that have started recognizing the latest html version though not entirely but fair amount enough to correct specific tiny things in the code. These minute flaws in the code can be mostly because of the different html editors used by the users and also the hand coding done by them.
If there are serious things which lead to drastic errors in the functioning of a website, then Google would be sure to detect it and point to the users. If Google really considers even the minor code errors then it can be said that there would be lot of websites which can be left out. Only because the search engine understands what the page is all about hence it does not consider the grammatical errors.
Google is capable of understanding and dealing with the pages that are grammatically correct even though there are small errors in the page, it also can different between casual pages and useful ones which is the main reason that there are still a large list of web pages displayed by the search engine even if their code has minor flaws.