Backwards compatibility is the reason IDs are mapped to properties of the window
.
It's also a major reason to avoid global variables - in fact some browsers will outright break if you try to use a global variable that's the same name as an element's ID.