I would suggest this difference is simply an anachronism from the age of HTML and LaTeX.
HTML, having evolved out of SGML (as did Docbook), actually got a lot of it's structural elements (i.e. <h1>
, etc) from IBM's GML/GMLguide languages. In GML, as with LaTeX, the focus of the language designers was on the presentation of content, rather than the communication of the structural composition of that content.
IBM's GML was designed with requirements such as dox-matrix printers (which only had one dot-size). Hence, a Heading-1 needed to look different some other way from heading-2, etc. As such, the height of a line of text was dependant upon what content role it played (i.e. as a heading). To prevent presentation-corruption, programs printing GML documents to dot-matrix line printers needed to know if there were enough lines (of dots) available for a heading, etc.
Since HTML borrowed most of these things from GML, it kept the idea of a fairly flat, presentation-oriented document structure. Where the floating paragraph under a (sibling) header was inferred as it's child since it was presented later in the (structured) document.
With the advancements on the web and rising ubiquity of the Internet, by the time XML came into the fray (mid-to late 90's, standardised in early 2000's), the communication (rather than presentation) of the content was what mattered. As such, XML document designs are usually much deeper than those of SGML/HTML/GML.
Now, as for an answer to your (somewhat broad?) question... I would agree with @Zibbobz's comment - that it does indeed depend entirely upon the requirements for your individual project. As a rough guideline, situations where you are dealing with limited hardware (printers, etc), the shallower a structure the better. But also, in situations where whatever your document is representing is clearly a composition, then use the composing nature of XML and make things nested!