Consider the following snippet:
First paragraph [[category:foo]] Second paragraph
It is parsed as
<p>First paragraph </p> <p>Second paragraph </p>
with the category "foo" added, which is correct. If we leave out second paragraph:
First paragraph [[category:foo]]
then the parser output is also correct:
<p>First paragraph </p>
But if we leave out the first paragraph:
[[category:foo]] Second paragraph
then the parser output is wrong:
<p> <br> Second paragraph </p>
Same happens also with language links. This is particularly troublesome when the "metadata" elements are stacked logically at the top of the page instead of the bottom, causing the infamous "gap" between the first heading (i.e. page name) and content.