
Another reason for it
You can pop up a new empty window with javascript, and then dynamically write contents into it. Until you've written something into it, the window has no document. There are probably also some theoretical guidelines on closing the window for writing before the document exists in the DOM, but considering how loosely browsers interpret invalid code I wouldn't bet on those guidelines ever having been followed.
===
Implicitly condoning stupidity since 2001.