It happened so often to me that I had serveral tabs open in Safari and unintentionally closed Safari and seeing all the tabs going away. There is no warning before closing all these tabs as it happens in Firefox.
But today I stumbeld upon Forget Me Not by Jim Fowler. It is a SIMBL plugin for Safari that remembers all the websites that are open when Safari is closed and opens them again when Safari is started.
I am sure Forget Me Not will save me from time to time from going through the browser history and search for the sites I wanted to remain open.