Web pages (unlike Android layout files) are complicated composites of multiple data sources that are generated on-the-fly, and are combined in complicated (but sometimes low-tech) ways like string manipulation. Under such circumstances, it is simply too hard to create perfect XML every time.
Oh fun, bad analogies time! How would you like it if your word processor refused to save a text document because it detected an incomplete sentence?
Now as it happens, C compilers have a syntax validator as part of them. Lots of HTML editors, past and present, have used HTML validators too...
That's actually fundamental design aspect of HTML which was partly responsible for it's popularity.
HTML itself has its warts, sure, but the fact that we end up constantly resorting to HTML and/or Javascript edits to do things that should be happening in CSS alone is, to me, a much worse problem.
The problem was that doing so broke most of the web, or was not internalized by page creators. So we're stuck with the current situation (bad markup, crufty designs, etc.).
Imagine if the first HTML editors forced a schema check before save. I think we'd be in a much better place now if they did...