That isnt the primary mode by which the assignment of sex happens in our society. Stop being an idealist around what sex is, and actually grapple with how sex classification practically happens within our society.
When doctors mutilate intersex babies they don't wait for a chromosome test.