The technology metaphor I've always used is serialization, which I think still makes sense for the action, but I really like defrag and garbage collection as the metaphor for the actual value in the activity, so I'm going to keep that, thanks!
For me the metaphor is DRAM and swap. To hold data in DRAM you have to pay the occasional refresh cycle, or else it may fade away. You swap your thoughts to paper (or disk) to get rid of that nagging feeling that you're about to forget something that could be important. This frees up brain cycles (and memory) to focus on the next thing.
Two days or years later you may skim your past thoughts, and there is some chance that it connects back to whatever is in your working memory right now. Then you can swap it all back in, and you have a chance to make a really non-trivial connection between related topics. Or you may notice that you are going in shallow circles around the same topic every few months, and now you can either put the topic to rest, or swap all instances back in and give them some serious thought and connection.