How does ChatGTP write?

The other day I started working with chatGTP by testing its creative writing skill. I sketched out what kind of story I want to write, the characters etc. Very soon it belted out a brilliant prologue...niw I am asking my self, us out browsing already existing books and stealing their way of describing things?