You didn’t ask something novel enough and/or the LLM got “lucky”. There’s plenty of occasions where they just get it flat wrong. It’s a very bimodal distribution of competence – sometimes almost scarily superhumanly capable, and sometimes the dumbest collection of words that still form a coherent sentence.
The mildly entertaining YouTube video below discusses this.
https://youtu.be/QrSCwxrLrRc