The mother of Maryam wished to have a baby boy so he could serve Allah. When she delievered a girl, she said O, Allah, I have delivered a girl. Allah knew what she delivered and he knows best. He said the female is not like the male. At this stage Allah knew very well that Maryam is going to be the most devout woman in the world. SubhanAllah!