You would think that the most qualified person regardless of gender or race would be a party’s nominee for President. That’s not true and has never been true but for different reasons and to different degrees now than in the early history of the two major parties.
Gender and race were not an issue before 1865 and 1920 when Blacks and then women respectively gained the right to vote. Before then only white men were eligible to vote. And since neither slaves nor women could vote, no slave or woman was eligible for office. Even after women were granted the right to vote, social norms dictated that their vote would not be exercised independent of the male head of the household. And Jim Crow laws saw to the continued disenfranchisement of Blacks who were technically eligible for office and to vote but who practically speaking were not allowed to do so.