If you find Firefox not asking you to save tabs and windows on exit which generally does, then you have either set Firefox to start automatically in private browsing session or Firefox settings are not correct.Here how we can make Firefox to prompt to save tabs and windows for next time it starts.
If you are starting Firefox automatically in private browsing session then you could observe private browsing option appears grayed out or disabled in the Tools menu.
Otherwise Firefox settings are incorrect.
1.Open Firefox, from Tools menu click Options in General tab select show my homepage when Firefox starts .
2.Now select Tabs tab and select warn me when closing multiple tabs
3.Click OK to save changes.