I don't think hiding is what the OP is trying to do.
From what I've experienced, it's just sometimes annoying when this happens. Say, you've got various other tabs open on one window. And suddenly, when you do a shift-cmd-w all the tabs closes instantly. Cmd-z works fine if you press it right after the tab closes, but it doesn't work when multiple tabs are closed.