When Hibernate loads an object into a Session it creates a state snapshot of the current database state of the object, so that it can perform dirty checking against the snapshot.
As a read only object will never be modified, this snapshot is not needed and memory can be saved.
I think the ~/.mozilla/firefox/XXX.default-YYY/storage/default/https+++ZZZ.com/cache/https+++domain.com/ style dirs are the storage for what's called "service workers" which is persistent code related to each website that sends notifiications even if no related tab is open.
Suppose you have a favorite website that sells something, you might register with them that you're interested in a particular kind of product. A serviceworker for that site would be in the "ZZZ" folder named after that site, the code in there would run even if you don't have a tab open for that site. It's done so you can get a notification. In other cases it's some other code that the web designers don't want to have to reload each time you visit, caching it in your storage folder saves time and network.
You can see all your service workers in the Firefox menu: Help -> More troubleshooting information -> about:serviceworkers ( or load about:serviceworkers )
E. Pinheiro, W. Weber, and L. Barroso. Proceedings of the 5th USENIX Conference on File and Storage Technologies, page 2--2. Berkeley, CA, USA, USENIX Association, (2007)
T. Reps, S. Horwitz, and M. Sagiv. Proceedings of the 22Nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, page 49--61. New York, NY, USA, ACM, (1995)