Deferring script execution can sometimes get round some tricky problems with accessing a page before it is ready. There are certain stages that the page object model undergoes which are not apparent from the outside.
For example, when loading a page a complex object hierarchy needs to be built. That is not going to be complete until the closing </BODY> tag is encountered. Before that time, certain objects may be accessed but others may not. For instance, prior to the body closure, you cannot use a document.write() to insert an ActiveX <OBJECT> tag using inline coding techniques. You can do a <DIV> block replacement when the body has closed but an error results if you try to do this too soon.