It's not a bug, it's a feature.
Firefox' session restore feature, as its name says, is supposed to… restore my session. The whole session. Including the state of tabs, their form data… Everything. And this is great. This is the goal of session restore.
Mac OS X Mountain Lion's applications are now stateful, like on the iPad. The apps now have their state saved at quit and restored at relaunch. This behaviour of Mac applications is now recommended by Apple's guidelines for developers.
Computer systems will behave more and more like this, and this is a good move. Better get used to it. This can be somewhat disturbing at the beginning, because of our habits. But for newcomers, it is more natural. It is always a good idea to think of the paper analogy. Let's say I am writing in my notebook, I am in the middle of a sentence, and I suddenly close my notebook and I sleep. Without doing any “Save” action, without even thinking of a “Save” action. Three days later, when I open again my notebook, I find the page exactly as I had left it. This user experience is good. In computer software, the same user experience is good too, and I expect it.