Fantasy and sci-fi provide solid frames for the hero. In realist fiction, by contrast, the setting is presumed to be one very like the reader’s. So that heroes in realist fiction seem to be better than the reader, even though they were given the same circumstances to begin with. The reader must swallow the hard pill for himself or herself when regarding the hero, “He or she is like me, yet he or she is so much greater than me. What have I done to be inferior?”
On the other hand, fantasy and sci-fi are explicitly non-realist. So that characters in fantasy and sci-fi are not presumed to begin with the same circumstances as the reader. The characters are different enough so that the reader will identify with them to a lesser degree, but still “human” enough to teach lessons and carry themes that the reader will be interested in. This way, the heroes in fantasy and sci-fi are able to go above and beyond normal human standards, exemplifying the height of human aspirations, without upsetting the reader for his or her own inferiority.
For example, a story in the future can have a hero that has more knowledge than the modern reader. The modern reader won’t take offense to this because the hero is in the future and human civilization “has had more time.” Another example, an alien hero from another planet can be stronger than the physical reader. The physical reader won’t take offense to the alien hero because the alien hero is literally a different species and “has a different body.”
Of course, a major task the fiction writer undertakes is to make her characters seem real. In this respect, sci-fi and fantasy also give a great answer. For if the reader is to say, “That character is not realistic!” And the reader feels uneasy because of it. “Well, of course not,” the writer would say. “I’ve been explicit about that! This is a different time and different world about which I am writing. It is only tangentially similar to the world you know.”