It's an interesting question. How far can we, as readers, suspend belief? Does a story have to be rooted in reality to make us want to root for the characters? I don't think so. I think most people read for escapism. We want a good story and most of the time we will probably want an interesting story set in an interesting world far from our own. That is the definition of escapism. Life can be boring, tiring, monotonous. Sometimes we want to get away from it all. We want to pretend we are a cowboy in the old west, a captain of a space ship, an alien, a witch, or a princess locked in a tower. It's fun. It's enjoyable. It doesn't matter that the stories are fantastical. We care for the characters because we become them.
Harry Potter, Frodo Bagins, Han Solo, Luke Skywalker...are all characters set in fantastical worlds that people care deeply for. I'm sure if they kill off Han in the new Star Wars films there will be an uproar because he is one of the most beloved characters in science fiction history. People do care. It doesn't matter that the world these characters live in is different from our own. We can imagine living in it. Because that's what an imagination is for.
I think it can be good to leave reality behind for a little bit sometimes. We all need a break from our lives and books and TV and film can provide us with a way to relax and unwind and forget about work for an hour or so. That's not to say that readers cannot connect to characters in literature or non fiction stories either. In the past couple of years I have gotten into reading autobiographies and they can be just as enjoyable. The difference with those stories is the people in them are real and the events really happened. It's less escapism and more being an observer to someone else's life. Personally, I find fiction more enjoyable, but there is something fascinating about non-fiction. I guess I do emotionally root more for characters in autobiographies (especially since I read true crime books) because I know they're a real person and the events I'm reading about actually happened. But that does not mean that I do not care just as much for fictional characters.
How much a reader cares for a character (whether they are in a fiction or non-fiction book) comes down to the talent of the writer in the end NOT the choice in genre.