I sometimes wonder why these topics get so religious and dogmatic. My own pragmatic point of view is that writing valid code is no more difficult than writing invalid code. That libraries produce invalid code, well, it's not all that difficult to fix a library and it's a big help. I've had to do it with some of my own and a one time fix improves a lot of pages down the line.
As for search engines, their job is not to discriminate against bad code but to return the best possible results. If 95% of the biggest websites use bad code, search engines are forced to deal with it (just as we are forced to deal with non-standard compliant browsers) but that does not mean they would prefer invalid code.
I can't find a single reason for me not to write valid code. But that's just me and I'm quite happy when the competition writes crappy websites, we do so much better in Google for it. It's their loss, our gain.