XML validators are much more common in editors than HTML validators, probably because XML is both easier to parse and used for a lot more than XHTML.
If I were inclined to follow Google's guidelines on omitting optional tags, it would be easy to write a stream filter that removed them [3].
But I prefer source templates to have all the explicit properly indented structure, so they're easier to validate and process with XML tools (and by eye), and unintentional mistakes don't sneak through as easily.
For the same reason, I also prefer not to write minified JavaScript source code: that should be done by post-processors, no humans. ;)
[1] https://genshi.edgewall.org/
[2] https://genshi.edgewall.org/wiki/ApiDocs/genshi.output
[3] https://genshi.edgewall.org/wiki/Documentation/streams.html#...