As someone who almost-exclusively reads YA fantasy, and occasionally dabbles in the realm of science fiction books, there is a proposal I'd like to make: can we please stop saying that these genres aren't realistic?
Now, I know better than anybody that fairies and spaceships and intergalactic warfare aren't a part of the reality we live in (at least, not yet), and that no matter how hard we wish for a pet dragon or a glimpse into other galaxies, those wishes won't be granted. Those parts of these books are definitely otherworldly, but not "unrealistic", because they stem from reality.
There's an old saying that goes something like "life imitates art," and the same can be said about art imitating life. Do you think that Orwell wrote "Animal Farm" because he wanted to show us how evil talking pigs could be? Or that "Life of Pi" was really just about a boy and a tiger? No! These books were written to express a concern or thought that stemmed from real life. Fantasy and sci-fi novels are the same way.
Take, for example, "Illuminae" by Jay Kristoff and Amie Kaufman. Without going into the dreaded spoiler territory, I can tell you that this book is about space warfare and questionable AI units. That's not all that it's about though. Using case files and chat logs, readers of the book get to know the main characters, Kady and Ezra, really well. We get to see the struggles of their relationship post-breakup (not a spoiler- I promise) and how they still manage to work together, despite being teenagers and exes. That is the part of the novel that makes it realistic: the characters' emotions and backstories, and the way that a dynamic between two people is forced to shift in order to survive a situation. That is the part that stems from real life!
This same, realistic approach to human nature can be found in novels like "Miss Peregrine's Home for Peculiar Children," the "Wayward Children" series, and "Harry Potter," where the magical elements of the story are entirely their own, but the human nature found within the characters is so rich and realistic that people are able to relate to characters, despite never having traveled through time loops, or through doors to other lands, or taken a polyjuice potion.
And this use of reality in fantasy and sci-fi doesn't just stop with micro-relationships, either. Novels like Justina Ireland's "Dread Nation" take zombies and drop them into Reconstruction-era America. The storyline effectively provides a critique on racism in the way that characters are seen spending as much time killing zombies as they are having to be able to "pass" as white just to survive.
This is why people can't say that fantasy and science fiction are automatically unrealistic. While certain aspects of the book may be, the underlying meaning in the novel is something that is undeniably human in nature, making it just as realistic as it is far-fetched. That's the beauty of novels, though: they can take something so out-of-this-world, and something so mundane, and mesh them into one, big magical bindup.