Evolution doesn't make things necessary "better", it only makes things "good enough".
Humans don't NEED to be as good at memorisations as chimps, so there's really no pressure.
I was only simplifying because the abstraction tends to attract wrong ideas about how evolution works.
Chimps as a whole become better at memorisation because chimps who don't become better at memorisation fail to produce offspring (generally either by failing to mate, e.g. through sexual pressure; or by dying before they reach maturity, e.g. by getting eaten). There doesn't seem to be sexual selection pressure in memorisation skills, so it's likely that chimps need those skills to survive long enough to mate. Ergo, natural selection favours chimps that are better at memorisation (or rather, better than humans).
Of course investment is also an important variable, but the cost of better memorisation skills is apparently not very high (e.g. in terms of energy needed by the brain).
Anyway. The point remains: evolution means adaptation, not universal perfection.