It's not that ChatGPT is knowledgable, it's that it's presenting knowledge.
It's mathematically choosing an order of words to present knowledge we've encoded it with/trained it on.
The choice of the words itself isn't really knowledge (depending on how you define knowledge).
There is a related thought experiment that addresses this idea https://en.wikipedia.org/wiki/Chinese_room
If you mean "it doesn't also have knowledge of the wolrd, facts etc", well, it has been trained with a huge corpus of all kinds of material, so it does.
If you mean "it doesn't understand it, so it's not real knowledge", then that's getting into philosophy/semantics, and it could be argue that it does, or that what humans do is not very different...
How do you define "having any knowledge"? How is what ChatGPT does different from that definition?