The Bible teaches that the purpose of prayer includes making our requests to God, as well as giving thanks and praise to God. However, the main purpose of prayer was demonstrated for us by Christ in the garden before His crucifixion. Jesus prayed, Oh My Father, if this cup cannot pass away from Me unless I drink it, Your will be done (Matthew 26:42). In prayer, Jesus submitted to His Father's will.
The purpose of prayer is to submit to God's will. Prayer should not seek to change God's will, but to surrender to God's will. That does not mean we should quit making our requests to God. Jesus requested that the cup of suffering would pass from Him. He made that request more than once. Yet, His prayer to the Father concluded, "Your will be done." He is our example in prayer.
Someone may ask, "If God is unwilling to do what I want, why pray?" That question tells me more about the person who asked than it does about prayer. Sure, all of us want God to do what we request, and often He does. However, submitting ourselves to God is prayer's primary purpose. We submit our will to God's will. That means we are following the example of Jesus our Lord.
Jesus taught us to pray to God our Father in these words: Your kingdom come. Your will be done (Matthew 6:10). Continue to make your requests known to God, but don't forget prayer's primary purpose. Pray God's will be done on earth as it is in heaven.