Show us where we are told to pray for the dead.
Chapter and verse.
There is a hint of it in Genesis 49:29....
“And when Jacob made an end of charging his sons, he gathered up his feet unto the bed, and expired, and was gathered to his people.”
If we take that to mean the souls who had gone before, (which I believe), then it only makes sense to pray that that reunion be as wonderful as God can make it.
At least to me.