It is given unto man once to die; after that, the Judgement.
To what avail, therefore, any prayers we might offer on behalf of the departed? They died either as believers in the atoning sacrifice of Jesus, the Christ, or not.
"It is therefore a holy and wholesome thought to pray for the dead, that they may be loosed from sins." 2 Machabees 12:46
"Every man's work shall be manifest; for the day of the Lord shall declare it, because it shall be revealed in fire; and the fire shall try every man's work, of what sort it is. If any man's work abide, which he hath built thereupon, he shall receive a reward. If any man's work burn, he shall suffer loss; but he himself shall be saved, yet so as by fire." 1 Corinthians 3:13-15
"For, for this cause was the gospel preached also to the dead: that they might be judged indeed according to men, in the flesh; but may live according to God, in the Spirit." 1 Peter 4:6
Prayer for the dead helps them through that purification, which is why Jews, Catholics, and Orthodox Christians do it, and have done it since well before the time of Christ.