I don't think I've ever seen a well functioning organization that gives a leadership position to someone who hasn't already demonstrated leadership qualities by proactively taking on a leadership role.
Usually people get promotions like that after the prior leader has quit and they have spent some time filling in in the interim. Or they apply for jobs that have leadership responsibilities as the next step of their career ladder until they get one. In both cases seeking the role comes before actually being granted it.
It's very rare for organizations to grant leadership roles to anyone not already seeking it (usually by performing that role or applying for that job) in some capacity.
No, I'm confident there are gender-based biases. But the degree of the problem needs to be considered accurately, which means understanding all of the exceptions and how frequently they occur.