In some of our prayers we have been consistent in asking our Lord the same thing year after year. He promised that He will hear every prayer and He will do anything we ask Him. So why God doesn't just do it?

Typical case: The Nobleman, which son was sick

John4:46 And there was a certain nobleman, whose son was sick at Capernaum. 47When he heard that Jesus was come out of Judaea into Galilee, he went unto him, and besought him that he would come down, and heal his son: for he was at the point of death. 48Then said Jesus unto him, Except ye see signs and wonders, ye will not believe. 49The nobleman saith unto him, Sir, come down ere my child die. 50Jesus saith unto him, Go thy way; thy son liveth. And the man believed the word that Jesus had spoken unto him, and he went his way. 51And as he was now going down, his servants met him, and told him, saying, Thy son liveth. 52Then enquired he of them the hour when he began to amend. And they said unto him, Yesterday at the seventh hour the fever left him. 53So the father knew that it was at the same hour, in the which Jesus said unto him, Thy son liveth: and himself believed, and his whole house

The father puts in his heart a condition: I will believe in Jesus, if He is powerful enough to heal my child. Jesus read his heart and desired not only to heal the child but to heal the father's doubts as well. He told him: Except ye see signs and wonders, ye will not believe. Then the father realises that his son's life or death depends on his faith, and responds: Sir, come unless my child dies. Jesus heals the boy, which is miles away,  and tells the father that the boy is already healed. The father have to BELIEVE the words of Jesus, since Jesus didn't issue him a certificate of healing!

The same with us. We often seek Jesus because we need our problems sorted out. He wants to sort them out, because he is our best friend, but he wants also to sort our standing with Him. This is why he procrastinates the answer of some prayers (some he answers immediately), just to show us that we knock at his door out of selfish motives. Recognising this and throwing our selfishness away gets us near Him and much happier!