Baron Opal II
Legend
Fun question (for us worldbuilders, anyway)!In all D&D settings magic exists, can be controlled, and can perform feats of power unrivaled by non-magical means . . . why haven't those that practice magic taken over the setting?
In much of the fiction and games that I see this addressed, the main limiter is that use of magic requires inborn talent and there are not many with this talent compared to the rest of humanity. Human waves of desperate people have overwhelmed smaller yet technologically superior forces in the past. Also, no one rules alone. Regardless of personal might, the ruler needs those to work in their name to control the country's populace and economy.
That said, there are also plenty of examples in history where a smaller in-group has ruled over a larger out-group for generations. If magicians coordinate they can comb the population for the talented. Once recruited, train and indoctrinate them as a new part of the in-group and elevate the family to semi-group status. This can perpetuate this particular social order. The out-group endures poorer treatment with the (vain) hope that they, their children, or a close friend will find themselves elevated.
This, however assumes a level of cooperation. If there is one thing that I've learned in health care, getting highly educated autonomous professionals to simply adhere to the same treatment protocol is like herding cats. It doesn't necessarily matter how much data is behind it, there are so many excuses why it won't work for them. Department meetings can be stormy. If you want them to comply, you have to print provider specific metrics to goad them into competition with each other. It works especially well if the department underdog leads the metric.
There are a lot of assumptions riding on ruleset and edition. I would say that AD&D has a greater ability for development of magocracies that 5e, for example. Ars Magica ennumerates several restrictions on the use of magic and activities of magicians for the greater good of magical society. That's a game where wizards are explicitly the most powerful "class" in the game. If not everyone can use magic, then, yeah, I have no problems in imagining that a particular magician's magocracy lasts only as long as they do, with the swords coming out to herald the end or pick a non-magician as the next in line.