**(For if he had not hoped that they that were slain should rise again, it would have seemed superfluous and vain to pray for the dead,) And because he considered that they who had fallen asleep with godliness, had great grace laid up for them. It is therefore a holy and wholesome thought to pray for the dead, that they may be loosed from sins." II Maccabees 12**
What if you die and no one prays for you?
So someone thought it was a good idea to pray for the dead?
Big deal......
In the NT church Paul addressed the practice of baptizing people for the dead. It certainly doesn't prove anything, except that it happened.
It doesn't mean God approves of it or makes it a means of salvation.
David thought adultery with Bathsheba was a good idea but that didn't make it right. Just because Scripture records that something happened, doesn't make it doctrine.