It's because spacing is used for both structure and presentation in HTML, so something like:
<span>This is some text</span>
<span>while this is some more text.</span>
shouldn't render the 4 indentation spaces that I used.. If it did we'd have to pack it all into one line. Can be adjusted appropriately with CSS though, if people here were obsessive about the presentation of their spacing.
Is there a good reason the browser messes up my spacing? Certainly not for readability!