Spontaneously I would say, it's because you add all the images to the document at once, and while the browser (in my case Chrome) doesn't actually load them until the page is displayed, there is no reason for it to unload them.
You should try writing it, so that you only add the images to the DOM when you display them, and remove them when not.