This is literally the origin of the nobility. Many pre-modern cultures had class system consisting of clergy, warriors, and commoners; the warrior class eventually turned into a nobility class whose martial role eventually elevated to that of officers. Even today, members of the British Royal Family, of a certain age, are expected to perform military service; Prince Harry served in Afghanistan flying Apache attack helicopters, while Prince William flew search and rescue helicopters in the RAF. (Traditionally this was true only for men, but times change faster than you think; Queen Elizabeth II, before becoming Queen, was briefly a military lorry driver during the Second World War.) Similar things happened in i.e. Japan (where the samurai became a ruling class).
In retrospect, it's kind of obvious why the clergy and warrior classes would gain power: clergy, by dint of education and spiritual authority, and warriors, by dint of being well-armed and good at killing people, both have a natural degree of power over others.
Another important point is that this tended to occur only in settled civilizations (which, admittedly, was most of the world by the 18th century or so.) Settled civilizations prior to the Industrial Revolution needed an educated clerical class and also large numbers of farm workers (because agriculture was labor-intensive) meaning only a few people could devote themselves to being really good at fighting, or alternatively wearing ridiculous clothes, throwing lavish parties, and marrying their cousins for political reasons, as the case may be. In contrast, hunter-gatherer societies tended to have the entire male population not only more physically fit than even most knights and nobles, but far more practiced at hunting and warfare, with enough overlap in the relevant techniques (e.g. horsemanship, use of weapons, etc.). Many settled civilizations were dominated by nearby hunter-gatherers--the Greek city-states by Alexander's Macedonian Greeks, the Chinese by the Mongols--because there's really no way for a pre-industrial civilization to hold their own against hunter-gatherers. Hell, even as late as the 1870's, large amounts of the United States and Mexico were effectively off-limits to white settlers because of the power of the Comanche, who only fell because (a) like many fallen American Indian peoples, they had plenty of enemies who were more than willing to help the whites defeat them and (b) the United States at that point was just barely no longer a pre-industrial civilization. Oh, yeah--and, as of the American Civil War (to bring this full circle!), it was now possible to enlist large numbers of common people and send them to war instead of risking a smaller ruling class of nobles.