How does the brain curate memory for adaptive behavior?