Here is something that I wrote for parshas Vayeira (I never finished editing it so it's still a little choppy and rhetoric).
In parshas Vayeira, Hashem tells Avraham about his plans to destroy Sedom. Avraham then pleads with Hashem to Sedom from destruction. His tefillah is one of the greatest tefillos of all time. Avraham challenges the justice of Hashem, asking how could Hashem destroy the cities. Maybe there were ten tzadikim in each one and in their merit the cities should be saved. How can Hashem destroy the tzaddik together with the rashah that would be injustice.
When told that there weren't ten tzadikim in each city, Avraham didn’t give up. He challenged Hashem again, maybe there were nine and that was enough, maybe eight.
Some even explain that the reason why Hashem told Avraham in the first place was to hear his tefillos.
The question is that we know that in the end Sedom was destroyed. What then happened to all those tefillos, did they all go to waste? What was the point of them if they didn’t even accomplish their task?
If this is true that Avraham’s tefillos went unanswered, how should this make us feel about our own tefillos?
In school they teach us not to worry no tefillos are lost, Hashem saves each and every one for a later time. Does this mean that I am davening sso that Hashem should save my tefillos? But I want my tefillos to work for me now, to save me from my current troubles, shouldn’t my tefillos work to give me what I am asking for?
The answer is that we are making a mistake about the avodah of tefillah.
We go through life with master plans about what we want to do or are planning to accomplish. When something gets in the way of our predetermined life plan it seems to be an obstacle. We then turn to Hashem to solve our problems and get upset when He doesn’t follow our plans.
With this logic, things that go according to the way we want then to go, mean that Hashem is listening to us and maybe He even deserves to have us do a good deed or two. If on the other hand things don’t fall into place the way we want, we get upset and angry at Hashem. How could he destroy my plans, how could He cause me so much anguish, does He not want me to succeed?
The answer is that of course He does, but we need to clarify what it means to succeed. We are in this world to serve our Creator, to reveal His glory by removing the evil from ourselves. The more we remove ourselves from the vanities and fleeting pleasures of this world, the closer we will be to removing evil. We only have a limited number of years to live and during that time only a limited amount of energy. Anything spent on pursuing the pleasures of this world is that much less available to be spent on spiritual needs. It goes even further than this. The more we invest in this life, the more we are making this temporary world important to us. By pursuing the vanities of this world we are showing that it is more important to invest in short term gains at the expense of long term ones. It’s either one or the other, you just can’t have both. You cannot value physical pursuits and at the same time value the spiritual ones, one takes away from the other, whichever one you give your time and effort, it’s at the expense of the other.
With this in mind, it follows that the avodah of tefillah cannot be purely to get what we want from Hashem, after all, what we want is most likely not even good for us unless it is our spiritual desires. Now it makes sense why Hashem doesn’t give us everything that we ask for. This is because He really does love us and does for us only what is really going to help us reach our spiritual needs. It’s more than “it’s all for the best”, It must be clear that something that we want purely to fulfil our desires will most likely make our avodas Hashem more difficult. In order to grow we need to learn to live with not getting everything that we want and learn to live with less. We will be happier and ultimately be more successful in what really matters.
If all this is true, what then is the purpose of tefillah?
One of the peshatim that is said is that when we daven, we are acknowledging that whatever it is that we are asking for is completely out of our hands and in the hands of Hashem. We are making ourselves aware that Hashem is the kol yachol, and that He can do whatever he wants. We then can reach the level of clarity that whether it goes the way I want it or not it’s the will of Hashem. We understand that Hashem could make it go either way and it’s in His power to turn things around if that is what He sees fit. We use tefillah as a way of connecting to Hashem and strengthening our emunah and bitachon.
With this understanding of tefillah, we see that there is no such thing as a tefillah that goes to waste. Even a tefillah that wasn’t answered the way we wanted still accomplished the most important aspect of tefillah and that is becoming closer to Hashem.
Although Hashem does save tefillos for later times, nothing can change the level of closeness reached through the actual tefillos. When Avraham Avinu davened, he was literally speaking to Hashem (getting real time answers) and connecting. Even if they didn’t work for what he had wanted, the connection, the trying to understand Hashem’s ways, the growing and becoming closer are still there.
This was a thought that I had on the parsha, please let me know what you think.