After a fierce battle, Judas and his army gathered the dead for burial:
εὗρον δὲ ἑκάστου τῶν τεθνηκότων ὑπὸ τοὺς χιτῶνας ἱερώματα τῶν ἀπὸ ιαμνείας εἰδώλων ἀφ' ὧν ὁ νόμος ἀπείργει τοὺς ιουδαίουςThis, of course was both something of a scandal and an obvious cause for their ill fate in battle.
They found under the tunics of each of the dead things sacred to the idols of the Iamnites, which are forbidden to the Jews by the Law. (2 Maccabees 12:40)
ποιησάμενός τε κατ' ἀνδρολογίαν εἰς ἀργυρίου δραχμὰς δισχιλίας ἀπέστειλεν εἰς ιεροσόλυμα προσαγαγεῖν περὶ ἁμαρτίας θυσίαν πάνυ καλῶς καὶ ἀστείως πράττων ὑπὲρ ἀναστάσεως διαλογιζόμενοςThere is a clear thought that action in mortality can have some effect on those who have left mortality (and one can trace such ideas in Egypt back at least as far as the Middle Kingdom). The expression in 2 Maccabees where one can pray on behalf of the dead (ὑπὲρ νεκρῶν) is echoed in Paul where he notes that one could be baptized on behalf of the dead (ὑπὲρ τῶν νεκρῶν, 1 Corinthians 15:29). Both cases reflect the desire of the living to do something on behalf of those who have died that they can no longer do for themselves.
εἰ μὴ γὰρ τοὺς προπεπτωκότας ἀναστῆναι προσεδόκα περισσὸν καὶ ληρῶδες ὑπὲρ νεκρῶν εὔχεσθαι
εἶτε' ἐμβλέπων τοῖς μετ' εὐσεβείας κοιμωμένοις κάλλιστον ἀποκείμενον χαριστήριον ὁσία καὶ εὐσεβὴς ἡ ἐπίνοια ὅθεν περὶ τῶν τεθνηκότων τὸν ἐξιλασμὸν ἐποιήσατο τῆς ἁμαρτίας ἀπολυθῆναι
After he made a collection of two thousand drachmas, he set it to Jerusalem to offer an offering for sin doing well and honestly because he considered the resurrection, for if he had not expected that those who had fallen to rise again it would have been superfluous and vain to pray for the dead. Also since he saw that those who died piously had great favor laid up--the thought was holy and pious--so he made an atonement to do away with the sins of the dead. (2 Maccabees 12:43–45)