This is because prayer is answered purely as a gift because of Jesus and not because of our effort or worthiness. In fact, in Jesus perfect prayer given to the Church, He instructs His followers to pray for several things that God has already promised to do and which will happen even without prayer. Yet we pray for them out of confidence that they will happen, rather than in order to cause them to happen.
The number of things for which Christians may not pray is a short list: They may not pray for those who already died apart from Jesus to receive forgiveness and be saved, and they may not pray for sinful things or things that are harmful to themselves or others. In such cases, we can be certain that God will not grant what is asked for, because it is contrary to His revealed will.