Let's test how this applies to Google itself. I created an empty blog to Google's blogging platform Blogger at https://googlehtmlqualitytestblog.blogspot.com/ using default settings and only 1 test post. W3C Markup Validation Service found 14 errors and 13 warnings, altogether 27 issues.Write good, clean HTML
While your site may appear correctly in some browsers even if your HTML is not valid, there's no guarantee that it will appear correctly in all browsers - or in all future browsers. The best way to make sure that your page looks the same in all browsers is to write your page using valid HTML and CSS, and then test it in as many browsers as possible. Clean, valid HTML is a good insurance policy, and using CSS separates presentation from content, and can help pages render and load faster.
Google Search results page source code had staggering 364 issues, Microsoft BING 275 issues, and Duckduckgo 12 issues (3 errors, 9 warnings).
No wonder Google is blocking the access of W3C HTML validator. Unfortunately for Google, it is still possible to validate their code by copying it from page source and pasting it to the validator as direct input.
It is safe to say that while search engines prefer valid, error free HTML code, their makers are unable to produce such. Google Webmaster guidelines do not apply to Google.