Do they not teach evolution in schools anymore?
Organisms with better memory had a better chance at survival and procreation. That's all there is, no creation involved. Maybe if our memory was created, witness statements wouldn't be so terribly unreliable. As with most stuff evolved by natural selection, it's just good enough to do the job until the offspring is thriving without further parental need.