The entire verse of James 5:16, beginning with, "Confess your trespasses to one another, and pray for one another, that you may be healed. The effective, fervent prayer of a righteous man avails much," points to the intercessional prayers of the priest and the holy sacraments of Confession and the Unction of the Sick, which only the priest may administer. Since God is not going to converse with you in the customary human way of communication, He gave us the holy sacraments, that through them, we may communicate and unite with Him. These holy sacraments require certain prayers to be officiated. "I hear from within me, as from a spring of living water, the murmur: Come to the Father" St. Ignatius of Antioch. Therefore, even when we pray on our own, for our own needs and for each other, we draw energy in our supplications through our communion with God in prayer.
There is nothing selfish about praying for one another. Abraham tried to negotiate saving even ten people from the annihilation of Sodom and Gomorrah and God was willing to entertain the idea, but He knew that Abraham would not even find those ten (Gen. 18). Moses pleaded on behalf of the Israelites and was willing to forfeit his reward for their salvation (Exodus 32:32). In Exodus 19, we see how God shared His personal desires with His special servant Moses, and Moses faithfully conveyed God's message to the people, and then returned to tell the Lord of their response, almost naively as though God did not already know it. "So Moses told all the words of the people to the Lord" (Exodus 19:9). Prayer is not only an act of love for God and for one another, but it is also a deep expression of trust in God to do what is best for us. St. Isaac the Syrian says, "Thirst for Jesus, and He will satisfy you with His love."