Why do Mormons draw support for the practice of baptism for the dead from 1 Corinthians 15:29? First of all, the practice of baptizing on behalf of the dead was not revealed to the LDS Church until 1841. So when Joseph Smith was reading the Bible and performing what has come to be called his Inspired Translation, he did expound on the concept of performing temple work as a proxy for those who had passed away. In other words, the verse is not the basis of the doctrine, but rather is evidence of past practice of a doctrine which has now been restored.
But let's look at two technical points about how this verse is to be correctly understood. The verse speaks in the third person, as written by Paul, about "they" who are baptizing for the dead. Anti-Mormon literature frequently assails this as proof Paul is not saying it accomplishes anything, since he was not sent to baptize. As the reasoning goes, if Paul was not baptizing, then it must not be essential to salvation.
Two points show the folly of the anti-Mormon argument.
1. Paul says he is not baptizing people not because it was unnecessary, but because the people in the Church at Corinth were bragging about who had baptized them (1 Cor. 1:10-17). He notes that by the Spirit "All are baptized into one body," and through that baptism are made partakers of the Spirit.(1 Cor. 12:13). We know from Paul's other letters he believes water baptism is essential to putting on Christ (Romans 6:3-4; Titus 3:5, which uses the word washing, a word which in Greek means to thrust into water to clean something!)
So Paul's point is not that baptism is unimportant so he does not do it, but rather everyone there is baptized, and it does not matter who does it as they are all baptized into Christ's body.
2. Paul is very careful about the words he uses. So re-read 1 Cor. 15, and note the following: Whenever Paul uses a first person or third person pronoun(I, we, they, them), he always is speaking positively about those people, noting they have true faith (see 1 Cor 15:1-3, 9-11, 15, 18-20, 23, 29-32, 34-35, 48-52).
But those to whom he speaks to directly in the 2nd person (ye, you, your) he speaks in rebuke. Starting in verse two (after reminding them in verse 1 he had preached the Gospel to them), he notes their faith may be "vain" because they forget what he preached. He notes among "you" are those doubting the resurrection (vs. 12). He continues a rhetorical approach to their lack of faith by asserting their faith is in vain if Christ did not rise from the dead (vs. 17), and they are still in their sins.
Now comes the critical point of the argument. After discussing the resurrection of all the dead by Christ's atonement (vs 21-22), he notes the order of the resurrection is they who are righteous in Christ, then the rest, until Christ subdues everything (vss. 23-28). And the very next three verses compares everyone he is discussing:
Vs. 29 is about the faith of "they" who are baptizing for the dead, whose faith would be in vain if there really is not a resurrection. So he is identifying these people as faithful in Christ.
Vs. 30 Paul now notes "we" all stand in jeopardy constantly because of our true faith.
Vs. 31 notes "your" rejoicing is flawed because you do not actually believe in the resurrection of the dead, and such non-faith means a consistent response would be to live each day as the pagans, who feed their bellies (vss. 32-33).
Vs. 34 notes Paul is speaking to "your" shame. They need to awake to righteousness and sin not. This goes to the heart of the point that Paul started this passage by noting that "ye are saved, if ye keep in memory what I preached unto you, unless ye have believed in vain." (1 Cor 15:2)
So Paul affirms the correctness of baptizing for the dead, explains why he is not doing so, and reaffirms that belief can save us at this moment, but it is through repentance and righteous living, relying in faith upon the atonement of Christ, by which we will be saved in eternity.