2 Maccabees 12:44-45

44 For if he were not expecting that those who had fallen would rise again, it would have been superfluous and foolish to pray for the dead.
45 But if he was looking to the splendid reward that is laid up for those who fall asleep in godliness, it was a holy and pious thought. Therefore he made atonement for the dead, so that they might be delivered from their sin.
New Revised Standard Version Bible, copyright 1989, Division of Christian Education of the National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved.