Scripturally, the Bible in 2 Maccabees clearly states that it is an honorable practice to pray for the dead.
How can this be logically? Time exists within God. As an eternal being, God transcends time. God sees yesterday, today and tomorrow simultaneously. So if it is possible to pray for the dead at all, it doesn' t matter whether they died yesterday, five minutes ago or five centuries ago.
But our prayers are only efficacious for souls in purgatory, not those who have gone to either glory or damnation at their individual judgement at death.
And I still think it is kinda tacky praying to all all just merciful etc etc being to help Him make up His mind. Implies he can be swayed
Of course God cannot be swayed by us in the sense that we have any control over Him. Prayer is ultimately an irreducible mystery in which we are commanded to participate.