Aerius of Pontus in the fourth century rejected praying for the dead since he believed it promoted moral laxity in this life: "If the prayer of the people here has benefited the people there, no one would practice piety or perform good works." His objection was refuted by Epiphanios of Salamis.
(Panarion 75.8)
Furthermore, as to mentioning the names of the dead, how is there anything very useful in that? What is more timely or more excellent than that those who are still here should believe that the departed do live, and that they have not retreated into nothingness, but that they exist and are alive with the Master? And so that this most august proclamation might be told in full, how do they have hope, who are praying for the brethren as if they were but sojourning in a foreign land? Useful too is the prayer fashioned on their behalf, even if it does not force back the whole of guilty charges laid to them. And it is useful also, because in this world we often stumble either voluntarily or involuntarily, and thus it is a reminder to do better. For we make commemoration of the just and of sinners: of sinners, begging God’s mercy for them; of the just and the Fathers and Patriarchs and Prophets and Apostles and Evangelists and martyrs and confessors, and of bishops and solitaries, and of the whole list of them, so that we may set the Lord Jesus Christ apart from the ranks of men because of the honor due Him, and give reverence to Him, while keeping in mind that the Lord is not to be equated with any man, even if that man live in a justice that is boundless and limitless.