It adds a listener to the window object, which, as soon as the load event fires (that is, "the page has finished loading"), performs the initialize function.
those. this delays the Google Map-related script until the page finishes loading.
source share