Why? Well, to avoid compatibility issues, apparently.
W3C says:
To avoid problems with SGML line break rules and inconsistencies between existing implementations, authors should not rely on user agents to display blank space immediately after the start tag or immediately before the end tag.
as well as :
Please note that the rules for processing white space have already deleted all tabs and spaces after breaking a segment before these checks [by the value of the space property] take place.
Now it is unclear what inconsistencies will be introduced if browsers were allowed to keep spaces before the end tag, but there you have it.
source share