Why were all the Matriarchs barren? The Talmud answers that it's because Hashem desires the prayers of the Righteous. Now, that doesn't seem like a very nice G-d, does it? Why would Hashem make the Righteous suffer just to get them to pray to Him?
If, however, one looks into this matter a little deeper, the beauty of what is hidden within these words will be revealed.
When there is a bright background you aren't able to see something bright that is held up against it. Truly good things come about through hardship and suffering. The only way light can be revealed is through the darkness.
If everything will be good all the time, nothing can be defined as good, because there is no possibility of bad. Like our sages say "If I did not fall, I could not have arisen; if I had not been in darkness, it would not have been light for me" (Midrash Tehillim 22).
King David tells G-d "A Chassid should pray to You as soon as [misfortune] befalls, in order so that the flooding of mighty waters won't reach him" (Tehillim 32:6).
Water represents Chessed (kindness). If there is an overflowing of kindness, and it can't be contained, it has the opposite effect of its intention and the receiver perceives it as evil. The truth is, all evil in this world is just an overflowing of kindness. In order for this kindness to be felt as goodness, it must be limited. The attribute of kindness represents Avraham, while the attribute of limiting and holding back represents Yitzchak. The perfect combination of the two is Yaakov.
We see by Abram (before he was named Avraham) that Sara was barren and said to him, 'Look, Hashem has restrained me from bearing, come to my maidservant and I will build a family through her' and Abram listened to her.
Abram didn't pray, since he was full of chessed. He accepted everything G-d gave him whether good or bad and didn't ask for anything to be different.
The verse in our parasha first says Yitzhak "entreated Hashem" before we know that Rebecca was barren, and in the very same verse that we find out she is barren, we are also told that Yitzchak prays to Hashem, Hashem listens, and she conceives.
In next weeks parasha when Rachel tells Yaakov that she is barren, Yaakov doesn't pray to G-d, rather he teaches Rachel to pray. This is the ability to see that it is all from Hashems' goodness and at the same time teach the one who doesn't see that, the power of prayer.
From the attribute of Yaakov we are taught the goodness of negativity, distinction, and limitation within the kindness.
As you read (or will read) from Eliyahu Shurs' dvar torah, the last Mishna in Brachot says "One is obligated to make a blessing on the evil just as one makes a blessing on the good." The Gemara goes so far as to say that we must make the blessing on evil with the same joy as the good.
In the after-blessing on food we say "Blessed….who creates many living things and what they lack." We thank Hashem for our lack because it is due to the lack that we are able to see what we have. And the truth is we have EVERYTHING. When the bad becomes a tool for goodness, it in itself becomes good. Then the only thing we lack is the lack.
The blessing we recite over good fortune is "Who is Good and does Good." We are unable to fully receive His own Goodness. It comes down seeming bad to us because we don't have the right vessels to contain it. It is only when He 'does good' (from our perspective) that we can say this blessing. But the more we can bless Hashem for the lack, the wider and stronger vessels we will have to contain his True Goodness.
This is what the Gemara was teaching us when it said Hashem made the Matriarchs barren because He desires the prayer of the righteous. He doesn't need our prayer; He wants us to pray so that we can see the distinction and therefore be able to incorporate the negativity into our basket of goodness allowing us to receive more of the Ultimate Goodness.
Concentrate on what is being said at the end of Shobbas when the blessing of havdala is being recited.
Shobbas is going away. The most amazing day is disappearing. The purpose of creation, where we feel an intimate binding with our Creator, is leaving us. And we are blessing Him for this very fact!
"Blessed are you Hashem our G-d, Master of the world, who makes a distinction between holy and profane, between light and darkness, between Israel and the Nations, between the seventh day and the six days of creation…"
It is through the distinction that I am able see what I have, and specifically then should I recite a blessing.
"If I did not fall, I could not have arisen; if I had not been in darkness, it would not have been light for me"
May Hashem give us the strength to see behind the mask of adversity and perceive his true Glory.
"Even darkness doesn't obscure from You
And night shines like the day
The darkness is the same as the light."
Tehilim 139:12