This is a classic problem for machine learning systems, sometimes called over fitting or memorization. By analogy, it's the difference between knowing how to do multiplication vs just memorizing the times tables. With enough training data and large enough storage AI can feign higher "intelligence", and that is demonstrably what's going on here. It's a spectrum as well. In theory, nearly identical recall is undesirable, and there are known ways of shifting away from that end of the spectrum. Literal AI 101 content.
Edit: I don't mean to say that machine learning as a technique has problems, I mean that implementations of machine learning can run into these problems. And no, I wouldn't describe these as being intelligent any more than a chess algorithm is intelligent. They just have a much more broad problem space and the natural language processing leads us to anthropomorphize it.