Imagine a world call it Mundavia in which the dominant genre of literature is one in which plots, dialogue, and setting can be freely invented, but all the characters have to be real people. You can have Napoléon Bonaparte and Lady Gaga rappelling down the side of a Martian volcano while being shot at by Archimedes with a rocket launcher, and all will be well but invent a nonexistent valet for Napoléon and you will at once be regarded as having abandoned mainstream literature for a specialised genre: call the latter genre Pseudoprosoponic Fiction, or Pseu-Fi.
In Mundavia, the choice to write (or to read) Pseu-Fi is regarded as just that a choice. People ask why, e.g., Jane Austen and Joseph Conrad write Pseu-Fi, and speculate as to whether they will ever do justice to their obvious talents by switching to the mainstream. Those who write Mundavian Mainstream fiction, by contrast, are never asked why they chose that genre, because its not even regarded as a genre; its the default, by contrast with which everything else is defined as a genre.
Our world is a lot like Mundavia, with the exception that instead of licensing invented settings while forbidding invented characters, the mainstream fiction of our world licenses invented characters while forbidding invented settings. People your story with imaginary characters, and your work will still be accepted as mainstream; but place your story in an imaginary world (as I just did in inventing Mundavia), and you will be regarded as having chosen a specialised genre either science fiction or fantasy, depending on the details.
My point is that mainstream fiction is just as much a genre, just as much a choice, as science fiction or fantasy, and that there are no grounds for treating invented-characters-in-real-settings as any more of a natural default than invented-characters-in-invented-settings or real-characters-in-invented-settings or what have you. Theyre just different ways of telling stories. And to those who say that stories with invented settings cannot be relevant to real life, I ask how that can be so, given that no one doubts that stories with invented characters can be relevant to real life. What counts as mainstream is conventional and culture-relative. (In ancient Greece, convention dictated that comedies be set in the contemporary present and tragedies in the legendary past. This rule may strike us as odd, but Im sure it seemed utterly natural to Greek audiences. Of course there were plays that violated this rule e.g. Aeschyluss Persians, a tragedy that dealt with real events in living memory but those were, yknow, a choice.)
(For more on the invention of worlds in fantastic literature, see of course Tolkiens classic essay On Fairy-Stories.)