Because they value speed and cross-browser compatibility more than conforming with the standard. As long as the errors are minor and don't affect the page display (and I am sure Google is well aware of that), you do not really need to care about valid html code.
It is all about bytes and connections. Google minimises bytes transferred to you and number of connections from your browser to their servers. In scale of Google it does matter.
Because the errors are irrelevant.
So is it safe to have invalid code on your website then and Google will not penalize you for it?
Nobody cares. Google shall work everywhere, so they use cheats.