Sometimes all the prayers, repentance, intense Torah learning, and kind acts do not solve the problem of infertility. Months pass, years go by, and the couple does not conceive. It may be that their fate is sealed and cannot be changed, because the soul which they would conceive belongs to a more perfect world whose time has not yet come. Perhaps if they would manage to change their fate, their child would be profoundly evil, because he would be incompatible with his time period. Thus, God is being kind to them by sparing them the birth of a child who would cause them great pain and send them to the grave in misery. Along these lines, the Sages state that after the destruction of the Temple and the exile of the Jewish people, the dignitaries of the other nations mocked them and said that they were infertile and could not have children in Eretz Yisrael. The Jews retorted, “When evil rules the land, it is better to be barren rather than give birth to evil children who will end up in hell, like you” (Berakhot 10a). This explains the verse, “Rejoice, O barren one, you who bore no child! Shout aloud for joy, you who did not travail! For the children of the wife forlorn shall outnumber those of the espoused, said the Lord” (Yeshayahu 54:1).
Some writers go so far as to say that the infertile should be careful not to pray excessively. Instead, they should say that if their having children is not what God wants, then they retract their request, because sometimes heaven knows that were this couple to have children, they would be evil or undergo terrible suffering. To minimize the couple’s pain, heaven does not grant them children (Shevet Musar 24:19).
Even so, the infertile should know that all the prayers that they recite, the good deeds that they do, and the Torah that they study are not going to waste. Even if they do not produce the hoped-for result, they may help other childless couples conceive. In any case, these practices certainly improve the world and bring it closer to the day when those children’s souls can be born.