I think ChatGPT is really just serving up ghosts of previous conversation fragments in its lang training base, that appear to correspond with what you say to it. A massive lang base gives it a credible looking reply for nearly everything you say. But it's not doing any thinking.