Very basically:
this is because HTML sucks. It's its "relaxed" HTML syntax and a lot of uncertainties in interpretation of tags created the situation when HTML Web pages are rendered with so many difference by any pair of different layout engines, see
http://en.wikipedia.org/wiki/Comparison_of_web_browser_engines[
^].
So, it was natural that people created the language which would suck much less and gets more universal application. When I say "much less" I mean it: it still sucks. I feel it well because years ago when good parsers were not yet available I happened to develop some XML processing and knew a good number of inconsistencies, especially in the pretty lousy text of the standard. This is well illustrated by the
Annotated XML Specification by Tim Bray, see
http://www.xml.com/axml/testaxml.htm[
^].
—SA