It says in James that the prayer of a righteous person is extremely powerful (cf. Jas 5:16). Thats why we ask certain people or groups to pray for us.
We wouldnt normally, lets say, ask a random person on a street corner to prayer for us. Rather, we would ask those which we believe actually DO pray and who we believe God will hear.
This is why we ask the saints to pray for us. They are at the very throne of God offering up their prayers on our behalf (Rev 5:8) Who better to ask for prayers than those who are living in eternal Glory in the presence of God!
In addition to prayer there are other forms of supplication that we can offer on our own behalf and on behalf of others. Fasting and suffering are 2 most powerful forms of this. AND, since we are in communion with those in purgatory we can offer up our fasting and suffering on their behalf as well.
Suffering on behalf of others is very scriptural:
Col 1:24 - "Who now rejoice in my sufferings for you and fill up those things that are wanting of the sufferings of Christ, in my flesh, for his body, which is the church"
1 Jn 3:16 - "In this we have known the charity of God, because he hath laid down his life for us: and we ought to lay down our lives for the brethren"
Phil 2:17 - "Yea, and if I be made a victim upon the sacrifice and service of your faith, I rejoice and congratulate with you all"
2 Tim 2:10 - "Therefore I endure all things for the sake of the elect, that they also may obtain the salvation which is in Christ Jesus, with heavenly glory."
We are called to imitate St. Paul in sufferings for others.
The connection to suffering on behalf of those in purgatory is the same as it is for praying, in general, for others (even for those in purgatory) namely that
"that neither death, nor life, nor angels, nor principalities, nor powers, nor things present, nor things to come, nor might, Nor height, nor depth, nor any other creature, shall be able to separate us from the love of God which is in Christ Jesus our Lord." (Rom 8:38–39)
Since WE are united as one body in Christ THROUGH the love of God . . . death does not separate our communion with another in Christ. So just as much as I can pray for you while you are alive here on earth, so too can I pray for you or suffer for you (for the quick remission of temporal punishment due to your sin) after you depart from this earthly life.
image via creative commons license. A Procession in the Catacomb of Callistus (Prayers for the dead). Alberto Pisa. 1905