Early assignment of the sex is important for the emotional well being of the person. In large part, the decision is based on the corrective potential of the ambiguous genitalia, rather than on chromosomal determinants. Once the decision is made regarding sex, from that point on there should be no question in the family's mind regarding the sex of the child.
I must take objection to this statement. I realize that DMan is just reporting what is, at least in some areas, accepted practice and belief, so this isn't directed at him.
But the idea that it is better for the child to perform immediate correction of the genitals has been in debate, especially recently. There is much evidence that the gender of a person is not just a social construct, that parents can't just make a child into a boy or girl. Just because it is easier for a doctor to make the child appear to be a certain sex doesn't mean the child will normally develop as that sex.
Rates of gender identity disorder among intersexed people are very high, and there are societies to support the intersexed because of various problems resulting from it. There are a growing number of people that consider "corrective surgery" to be more along the lines of genital mutilation.
True, the child will have problems in society if they are in an uncertain state, but that's not the child's problem, it's society and it's attempt to classify each person as either male or female with no room for anything inbetween.