This button not only closes the current window, but every one that the current application may have open. It is a lot quicker than finding all windows and closing them one at a time.
Finished browsing or reading all your emails, left lots of windows open? Don't want to have to shut them all one at a time? This little button can close them all, with out you having to do it all.
This button is a legacy add-on, and can not be ported to Firefox 57+.