I don't think humanity just replays history, but we are the same people our ancestors were, and our descendants are going to face a lot of the same situations we do. It's instructive to imagine how they would react, with different technologies on different worlds. That's why I write science fiction -- even though the term 'science fiction' excites disdain in certain persons.
The finest SF comes to grips with life's mysteries, with our resentments against our own natures and our limited societies. It does so by asking basic questions in the artful, liberating way that is unique to this form of writing. Echoes of it are found in other forms of fiction - in the novel of ideas, in the historical novel, in the writings of the great philosophers and scientists; but the best SF does this all more searchingly, by taking what is in most people only a moment of wonder and rebellion against the arbitrariness of existence and making of it an art enriched by knowledge and possibility, expressing our deepest human longing to penetrate into the dark heart of the unknown.