The best fantasy/sci-fi literature involves a lot of world building.
For some, the world building came first and the stories were an offshoot of that.
Tolkien needed a world and stories to bring life to the languages he was inventing.
Raymond E Feist's Midkemia was a massive collaborative effort for a RPG world. He has stated: "I don't write fantasy; I write historical novels about an imaginary place. At least that's how I look at it."
This is what you won't see AI doing...yet.