Rebutting some of your points (since that is my wont):
A. Historical advantage seems by far the most significant element here. E.g., you had to gloss over the science part of Star Wars's science fantasy, the huge potential of something like Star Trek for a sandbox campaign (imagine bridge crew/away team stuff, easy peasy, and space is as dangerous as "the wilds" can get!), and the enduring appeal of sci-fi TV shows, where fantasy TV shows have been...shall we say, few and far between unless they're specifically for children, at least in the West. I don't think fantasy is all that much better-equipped for this stuff than science fiction is. Now, you may be asserting here that "fantasy" includes "science fiction" (as some have), but you're pretty clearly talking about the really narrow "pseudo-medieval faux-European vaguely-Tolkienesque schizotech" branch that is so widely used by D&D and its offspring, and science fiction doesn't fit into that mold.
B. I mean, I agree with you that D&D does not actually simulate Europe (hence "faux-European"), nor the Middle Ages to any meaningful degree whether whole or in part (hence "pseudo-medieval"), but there's a big problem with your assertion here.
People act like that's what D&D is doing. A LOT. Almost constantly, in fact. That is THE reason people give for rejecting the existence of Monks in D&D, for example. It's not "these don't fit the kind of fiction D&D uses," it's "these are clearly non-European, they don't belong in a game based on Europe." Likewise, people argue against the possibility of a lively trade in magic items because no such trade would have been functional in Medieval Europe due to the difficulties of transport. People argue that most locations should be xenophobic and racist, ever ready to pull out the torches and pitchforks, because that's what they think Medieval Europe was like. (In truth, it was not; major trade occurred between the Middle East, North Africa, and Europe, to the point that even in England it was understood that "Moors" were people with dark skin--there would be no need to write about biracial characters in Arthurian romances nor Moors wishing to convert to Christianity if there was absolutely no conception of intercontinental travel!) And people WILL use claims of historicity to justify their positions.
So....the problem isn't that you're wrong, but rather that the community behaves as though you are wrong, and THAT is a long-standing and EXTREMELY serious issue with the growth of D&D.
C. There's two much, much simpler reasons why monarchies show up so much, apart from the rather trite "people associate fantasy pseudo-medieval faux-Europe with monarchies." They are: drama, and simplicity.
Monarchies allow for much more dramatic storytelling, because of the power and prestige vested in the crown. Being nobility is a fantasy for many; being royalty is particularly a childhood fantasy for many children, especially girls, who are often given fantastical princesses (whether or not they are actually princesses) to look up to as role models in fiction. We can intuitively grasp the meaning of being the princess, the one in charge. If a monarch is in danger, the whole country cares. If the monarch is evil, the whole country cares. If a monarchy is without a current monarch, that's a time ripe for civil war. A character may discover they are the true heir to the throne, or become involved romantically with someone who is. These are all high-drama stories, stuff that makes for a big 'oooooh' moment.
Related to, but not quite the same as, the previous: monarchies are simple. You have one leader, and everyone does what they say. Obviously real monarchy is a hell of a lot more complicated than that, as you ALWAYS have subordinates and people who owe you allegiance and functionaries who keep the system running etc. But a monarchy is much easier to grapple with as an individual person than even an oligarchy, to say nothing of a republic or a democracy (or both). Want to ask for help? You need to talk to one person. Want to force a regime change? You only need to take out one person. Want to go straight to the top? Simple--find an eligible unmarried monarch and put on the moves. Monarchies simplify the entire process of having to deal with a state bureaucracy into one neat, clean interaction, for almost anything one might want to do that interacts with them. Thus, monarchies (or dictatorships, though those tend to have bad reputations--and usually get called "empires") predominate.