Neuroscientist: Memory evolved to help animals react appropriately to situations they encounter by drawing on the past experience of similar situations  But this does not require that animals perfectly recall every detail of all their experiences
Instead, to function well, memory should generalize from past experiences that are similar to the current one
Generalizing from past experiences requires clear memories of most if not all the details of those experiences.