Mail will normally download the images in messages and then store them in a cache. If you do some sort of system optimization that flushes downloaded Mail attachments, that might explain what you're seeing. Simply defragmenting the disk should not do that, however.