Internet Explorer 4 introduced the document.all DOM (document object model) to allow access to the various parts of the web page. Soon after that the standard DOM method getElementById was introduced and is therefore available in all version 5+ browsers. This means that the document.all references are only needed to support IE4.
Just about no one runs IE4 any more and so support for the document.all DOM is no longer required. It is really surprising though how namy people still use it in their coding. Worse is that support for the document.all DOM is often tested for in order to determine the browser being used and if it is supported then the code assumes that the browser is Internet Explorer (which is completely wrong usage since Opera also recognises that DOM).
Using that DOM reference is never required unless you intend to provide support for IE4 as well as the more recent browsers. If you do intent to use it to support IE4 then you should first test that document.getElementById is not supported and only then test if document.all is supported. Then you will know that the browser is definitely IE4 and not one of the more recent versions of IE or Opera which support that ancient DOM as well as the standard one.