It works very similar to what we call "creative" output from humans
Metal Gear Solid 4 is a Hideo Kojima game about how Hideo Kojima doesn't want to make Metal Gear Solid 4. ChatGPT has infinite patience. It could never write Metal Gear Solid 4 even if you told it to, because it'd be lying.