"And G-d saw that Leah was hated and He opened her womb. Rachel remained barren" (29:31). G-d has mercy on the "rejected" wife, and thus spares Leah the trials and tribulations of barrenness. She too was destined to years of infertility but suffered enough by being "hated". Her fertility allows her to be the true mother of Israel and cements her relationship with Yaakov and thus is the one who ultimately is buried with him. Yet why was it necessary for our other three matriarchs to suffer years of childlessness? Our sages in a mystifying, cryptic statement claim that their barrenness was due to the fact that "G-d yearns for the prayer of the righteous". Whereas others might try to solve their problems through natural means only, the righteous will add the dimension of prayer thus bringing "pleasure" unto G-d. This seems like harsh punishment, hardly making prayer worthwhile. Pray less and G-d might more readily heed your desires.
Prayer must emanate from a sense of total dependence on G-d. One who feels that they are in control of their own destiny has no need for prayer. By praying we are declaring that we are not in control, that we are even quite helpless. Thus it is not newly found faith that lead many upon discovery of serious illness to prayer. Rather it is the realization that they themselves can do little to effect the changes they yearn for. While man must put his best efforts to solve his problems through natural means - "one may not rely on miracles"- we must also realize that ultimately it is G-d alone who determines the success of our efforts. It was crucial that our founding mothers who would set the paradigm of behavior of Jews throughout history understand this lesson. We are totally powerless without G-d's help. Only G-d, not modern science will determine who shall be born and who shall live. G-d did not "need" the prayers of our matriarchs, rather the they needed to pray to realize their utter dependence on G-d.
And what if G-d does not "answer" our prayers? What if one remains childless? With the realization that all is dependant upon the will of G-d then one must look for other ways to fulfill one's mission in life. Everyone has their own personal mission in life independent of others. In fact at times many unfortunately let their children fulfill obligations on their behalf; they may send their children to day school but be deficient in their personal fulfillment of the mitzvah of Talmud Torah. Even (especially?) without children one can and must be a servant of G-d, playing an important role in the destiny of the Jewish people.
This is a lesson that initially, even Rachel Imenu did not fully understand. "Rachel realized that she was not bearing any children to Jacob. She was jealous of her sister and said to Jacob, Give me children or else I die" (30:1). Rachel felt that without children life was not worth living. Such a feeling, while understandable especially in the pre-modern world, mistakenly minimizes the inherent value of women. Thus "Jacob became furious with Rachel". There are many ways to serve G-d and humanity aside from children. In fact, freed from the constraints that children place upon adults a childless person may be able to achieve great heights that would have been unachievable if occupied with one's children. It is worth noting that one of the greatest teachers of Torah of the past century, Nechama Leibowitz zt'l, was not blessed with children.
G-d desires our prayers as that enables us to realize that it is G-d alone who controls the world. But sometimes our prayers meet with a resounding no. When that happens we must refocus our goals and energies to find a different path in the service of G-d. Shabbat Shalom!