I would say (
and I have said) that another reasons that fantasy predominates in the RPG world is because fantasy, moreso than any other genre, particularly lends itself to both the "campaign" and to the reward play loop (zero-to-hero) that so many people enjoy.
There are more tropes to use in fantasy gaming than sci-fi gaming, IMO. One is "no cops", since you probably started in a poorly-defended border region with either monsters, hostile peoples, or both nearby. I could probably start a fantasy campaign today, just say "you guys are total strangers who meet in an inn", not do a session zero and still get a game going. I tried something like that with my first d20 Modern campaign and it failed so badly I had to start all over again. That's when I started doing session zero.
In addition, most people have a passing familiarity with medieval culture. Sure, we get a lot of details wrong, but it's harder to envision a future society. Suppose I'm totally new to D&D. Never played, never saw Critical Role, nothing like that. I still have some idea what a medieval lord is, what a peasant is, I played with a nerf bow and a sword once, I walked past a Catholic church once so I have some vague clue what a cleric is, I saw part of one of the Harry Potter franchise movies and maybe ten minutes of Lord of the Rings so I know what a wizard is, and I saw Goodfellas so thieves guilds and berserkers aren't totally confusing to me, and so forth. To do the same thing for a sci-fi setting, I would have to absorb a lot of details for that
one setting. Despite having watched a combined 26 or more seasons of various Star Trek shows I don't feel I know the setting well enough to run or even play in a Star Trek game. (At best, I could play in a Star Trek-
like universe. Preferably one without transporters!)
There's also rules issues, where you are doing things impossible in real life but you still have to deal with cell phone communication, computer hacking and stuff that medieval people never had to deal with. I've read a lot of sci-fi systems and essentially came up with two conflicting games I want to play:
1) Fate. This is rules lite. Very lite. You have a tricorder so you can detect stuff. The details aren't important.
2) A crunchy game like Mutants & Masterminds. Your tricorder carries out
these functions (unless you spend a hero point).
I wanted to play d20 Future, based on d20 Modern, a game system I liked, and is neither rules lite nor crunchy. But d20 Future was
terrible. It was heavier than Fate but lighter than Mutants & Masterminds. It had multiple subsystems that weren't balanced with each other (such as genetic engineering and mutations being different things) and a bunch of power ups that nobody asked for. It didn't know what it wanted to do. On the other hand, we all know what a sword does. Maybe we're calling it a longsword when it should be some other type of sword, but it's a sharp pointy thing you use to defend yourself.
I've heard/read that there are a lot more sci-fi book settings than fantasy settings. Ironically this might power interest in fantasy games. It's probably easier to start a Lord of the Rings game than a Babylon 5 game because more people are familiar with LotR (from the smaller reference pool) than Babylon 5 (from the much larger pool of available sci-fi franchises).