Quasqueton said:
But does being first really have an effect on its popularity now, 30+ years after the beginning? There are many companies "first" in their market, but they aren't always the most popular 1+ years later.
I think so, for a couple reasons.
One, D&D wasn't just the first major RPG system, it was practically universal in its day. No matter what other system someone played, it was likely that they had played D&D also. And virtually everyone playing RPG's knew someone playing D&D.
Two, as has been pointed out many, many, many (ad nauseum) times, the RPG market has not been focused on bringing in new blood since the 1980's. How many current RPG players began with D&D? Over half I would guess.
Why do these things matter? People don't like learning new systems. If I and four friends know D&D, but only one of us knows Deadlands, and only two know Vampire, and one hates Hero System, guess which game we'll end up playing. Personally, I'm ready to try a different system, but I haven't been able to convince my group to switch - inertia, I suppose.
D&D's ability to change over time has also helped. Anyone publishing a system identical to the original brown/white box set today would be ridiculed, roasted, whatever for the lousy production values, incomplete rules, unbalanced play, monty haul treasure tables, and so on. But (with the exception of Diaglo

) we're not playing a 30 year old system.
For a new system to take over D&D's market share, it would have to be more than just an evolutionary improvement - it would have to be revolutionary. The only thing I can think of that might do it would be an RPG system that combined computer/VR technology - and that's years/decades away.
So the short answer is partly a common experience with some version of D&D, player inertia, and consistent improvement in the base system. Being first gave D&D the lead - these other things have allowed it to keep that lead.