Many industries are regulated by a specific set of codes and standards. The web also has such a regulation agency called the World Wide Web Consortium, or W3C. Standards determined by the W3C make sure that websites are viewable by a wide variety of platforms and web browser types. The search engine algorithms are looking for websites that adhere to these code standards and rank those websites favorably.
Internal errors in a website, while invisible to the end user, are visible to the search engines.