Mormons notoriously practice proxy baptism. They cite the cryptic verse in 1 Cor 15:29 as their prooftexts. For now I’m not going to discuss the correct interpretation of that passage. Ciampa/Rosner have a thorough and sensible explanation in their newly published commentary.
I’m going to make a different point. There’s an inner logic to the Mormon position given the premise, and their premise is a premise which liturgical churches share. If you believe that baptism is necessary for salvation, then there's an undeniable logic to proxy baptism given your operating assumption. After all, if someone dies before he was baptized, then the only way to save him would be through some retroactive, postmortem transaction involving a second party.
And liturgical traditions generally agree with Mormonism on the necessity of baptism. They like to quote those Scriptural passages which verbally link baptism to salvation, or other attendant blessings. They prooftext baptismal regeneration and/or baptismal justification.
But if, for the sake of argument, we accept that connection, then what about those who never had an opportunity to be saved?
Of course, you have churches which accept the premise, but then have to fudge on their governing principle, like the ad hoc, Tridentine escape-clauses involving baptism by desire or baptism by martyrdom. But in that respect, Mormonism is more consistent with the faulty premise than Catholicism.
It’s easy to attack the Mormon position, and rightly so. After all, Mormonism is a thoroughgoing cult. But when you think about it, liturgical churches operate within the same framework. They are simply less consistent. Vicarious baptism represents the reductio ad absurdum of a premise widely held by many theological traditions.