ChatGPT does not “know” anything. It however knows what things “look like”. So it can construct something that looks like a legal citation because it has enough references to be able to recognise the patterns. But it doesn’t actually know anything.
Any time it gives you facts, it’s giving you sentences where the statistical correlations of those words is higher than not, I.e. enough other people have said it for it to be probably true. But that’s the extent of its cleverness.