“and they turned to prayer, beseeching that the sin
which had been committed might be wholly blotted out.”
(2 Maccabees 12:42)

To understand this verse, read 2 Maccabees 38 to 45. Note: this takes place about 200 years before the time of Jesus. The dead solders had sinned before the battle by wearing a pagan good luck charm under their armor, something that was forbidden by Jewish law.

So the surviving members of the army, lead by Judas Maccabees, prayed that the sins of the fallen men would be forgiven. Next money was collected from all the men in the army, and sent to the Holy Temple in Jerusalem, for a sin offering. This shows that sin offerings were not just done while a person was alive, but after death also.  This chapter also show that multiple prayers for the dead were made, shortly after the time of death as well as “in the future” when the Priests of the Holy Temple in Jerusalem would make the sin offering for the dead.