Discussed here.
“when their lord husbands died…they were sent here, to reign over the vast Dothraki nation. Even the mightiest of khals bowed to the wisdom and authority of the dosh khaleen.” (emphasis mine)
The Dosh Khaleen have more than just ceremonial control, they are essentially the national government of the Dothraki and can overrule the khals, as well as being the Dothraki’s main religious authorities.
This aspect of Dothraki culture GRRM is probably borrowing from the Iroquois Confederacy, where descent was matrineal, and the clan mothers of the tribe were responsible for nominating, electing, and removing chiefs, and women played a highly important role in the formation of and operation of the Confederacy itself.