Do you want your fiction to teach you something new? And by teach, I don't mean life lessons, the themes about love being the thing you'd risk everything for and so on. I mean actual facts or cultural beliefs, like how Rick Riordan's Percy Jackson series, though it adds in a lot of other details, taught me about Greek mythology. "Greek mythology made fun" is like a tagline for that series, and for his others, Egyptian and Roman mythology made fun. I really enjoy those books, because they teach me something. I never had a Greek mythology class in school, so most of what I know comes from those books -- and I'm glad of it because so many people seem to write retellings of Greek mythology!
I once read that teachers wanted more YA historical fiction because they could assign those to their kids in parallel with textbooks and be able to discuss the history in a more engaging light with their students. Which reminded me of Robin LaFevers's series; though I don't know how real the God of Death was to people in that period or if that was something LaFevers changed for her world, it was fascinating learning about the kind of politics that would occur in a Brittany court.
And then that got me wondering whether each genre could teach you something different. I don't know about you, but I have different expectations for the underlying purpose for each genre. Dystopian fiction seems more philosophical, what have we done wrong; a criticism of our current society. Fantasy is about transporting us into a new world that's also familiar to us because there are metaphors and symbols of literary truths from our society. Contemporary seems about the lives we live and the immediate meaning to them. Historical, similar, but also how we lived then and whether we've come any farther. But those are just the expectations of different genres; can different genres teach you different things and would that work as well as for contemporary novels as it does for fantasy (i.e. Rick Riordan's series)? Magonia by Maria Headley had a lot of facts and a different historical perspective (the French medieval sailors' origin for Magonia), and I really enjoyed learning about that too. But again, fantasy, and Robin LaFevers's series has an element of fantasy to it too.
Then again, this is under the assumption that you would actually want to learn something from a fiction novel -- for me, the answer is yes if it's done well. Though I can also see why people would say no, especially when nonfiction is the place to go to learn specific facts, right?
Do you want your fiction to teach you something new? And do you think that certain genres are more suited to that purpose?