There are misconceptions propagated in our society that in ancient times of Bharat, Nation-states were always ruled by son of the King. This is not complete truth. Selection of successor was never exclusively birth based. As Kalidasa described precisely in this verse of raghuvaMsham.
अथेतरे सप्तरघुप्रवीरा ज्येष्ठम् पुरोजन्मतया गुणैश्च।
चक्रुः कुशम् रत्नविशेषभाजम् सौभ्रात्रमेषाम् हि कुलानुकारि ॥ १६-१
“Then, the other seven brave princes of the Raghu family made Kusha – the eldest both by his being born first and by his possessing virtues…”
The king is honored because of his qualities. It is not birth that makes a king. He is not respected so much because of his ancestry, as for his prowess, strength and valor. There were of course instances where seat of king was claimed by mere birth. But we are not talking about failed states or average states. When we look at the history and learn the lesson from it, we must thrive for best of it. And the best is, selection of King by qualities.
To support Kalidasa’s words, we have Allahbad Pillar inscription which records that Samudra Gupta was chosen among other princes of the family who were rendered crestfallen.
Conclusion:
It is half truth when someone says that only Qualities are important and not Varna. Similarly, it is also half truth when someone says that only birth is enough to decide Kingly qualities.
Best way to summarize: Out of all Kshtriya clans, the most powerful (full of Kingly traits) becomes the King with Praja’s (Citizen’s) consent.