I think we store past experiences to be able to deal with future ones efficiently (talking less philosophically and more biologically, to survive). By the way, I love the description "and wallow in misery as it may be". Sometimes it feels like lots of my memories seem to exist for this purpose alone.