It was trained on language for the primary purpose of producing text, but that’s not necessarily all it can do. The billions of nodes and parameters it contains allows it to compute ultra complicated equations. Who’s to say some subset of those nodes aren’t forming some basic primitive used for reasoning?
Without wishing to diminish the importance of this work (because it is genuinely incredible and useful in all kinds of ways), we still need to remember that under the hood it's really an elaborate parlour trick, a sort of reverse mechanical turk pretending to be a brain. More interesting I think is the question of how much of human intelligence is likewise this kind of statistical pattern matching; it seems to me increasingly that we're not as smart as we think we are.
In a similar manner to humans developing intelligence while being optimized just for reproductive success.
Also I would point out that emergent general intelligence would actually be quite an unsurprising result of deep learning for many people, given what we know about the human brain plus some hand-waving about emergent systems - I think many people actually expect something like that to happen, and that's exactly why so many people are jumping to that conclusion about GPT. It's confirmation bias.
But please enlighten me - where is the evidence that GPT-4 has generalised intelligence?