If God were to fulfill the desires of people according to their prayers then the Impartial Lord would become "partial" towards those who pray.
Then how does God fulfill the desires of His devotees?
Lord Krishna says "Whatever form a devotee seeks to worship with "faith" that "faith" of his I make firm in him". (Bhagavad Gita7/21)
From the material Standpoint, when we pray, and deter¬mine to achieve something we develop a "faith" in the goal and confidence in ourselves to do so. Faith is a, growing belief rooted in understanding. As this "faith" increases, the mind becomes more and more efficient. A single - pointed mind is indeed a mighty force against which no obstacles can stand for long. This "faith" irrespective of the chosen goal, is that which ultimately takes each one of us to our success.
Then what? How does one gain the fulfillment of his desire?
Reinforced with that "faith" in his chosen field man works harder. The Lord admits that by "His" grace that "faith" increases and consequently the efforts also increase with the increase of "faith". We put forth more and more efforts and as a result our desires are fulfilled. So, to say that we have been praying for years and our prayers have never been heard is the complaint of not those who pray but those, who only beg, without constantly striving hard to achieve.
From the spiritual standpoint, this verse is a very important one as it has carved out a distinct character for the Hindus—their unbelievable sense of tolerance towards all other religions in the world. The Hindu knows that "Truth is one; sages call it by different names." In whatever form man worships his God with "faith", in that form God shall be revealed to him.
Both in material and spiritual successes the secret of achievement is one and the same. If one desires the worldly things one gains them; if the spiritual experience, then one gains that too. If one's desires are materialistic •then one will seek them through worldly "devatas" (powers) and find one's immediate fulfillment.
Efforts remaining the same, the results depend upon whether we strive out-worldly for the passing joys, or dive inward to reach the permanent Bliss in the Self. In short, we can have what we wish for, if only our powers of wishing are powerful enough. Prayer brings about the necessary mental integration in ourselves, and assures our success in any field of endeavor.
Remember, prayer is not beggary. Nor is it merely an exaggerated glorification of some unknown entity called God repeated mechanically by the mouth in a language which is unknown to the devotee. Prayer is invocation with the mind contemplating on the greater Reality of Life, the Essential Life that energizes, activates, thrills the inert world of matter into living creatures, expands itself and in this expansion it soars higher into kingdoms of joyous experiences and true unfoldments.