Often it is needed to save the state of an object in some persistent way. For example, think of a word processor component that must store your hard work in some place. The well-known, simple solution is of course to store the object state (the document) in a file.
Enter documents in the component age. Documents may contain GIMP-components showing a picture, Gnumeric-components showing some spreadsheet etc., possibly recursively. How would your word processor know how to save the state for these components' state? And how could this all be stored in your average linear file?
Note that their are two questions here:
How can we store compound documents, ie. documents consisting of various (heterogenous) components?
How can we do file operations on a document consisting of components we do not know about at compile time?