Otherwise, what do people mean by being baptized on behalf of the dead? If the dead are not raised at all, why are people baptized on their behalf?  Why am I in danger every hour?  I protest, brothers, by my pride in you, which I have in Christ Jesus our Lord, I die every day!  What do I gain if, humanly speaking, I fought with beasts at Ephesus? If the dead are not raised, "Let us eat and drink, for tomorrow we die."  Do not be deceived: "Bad company ruins good morals."  Wake up from your drunken stupor, as is right, and do not go on sinning. For some have no knowledge of God. I say this to your shame. 1 Cor. 15:29-34 (ESV)
People do strange things when left to their own devices. Paul is calling attention to their inconsistency. It seems some were in the habit of being baptized on behalf of the dead, even though they believed there was no resurrection from the dead. Paul is not condoning this practice. He is chastising them for it, and making fun of it. It doesn’t make sense even by their own logic. A person cannot be baptized on behalf of another, living or dead, just as one cannot believe on behalf of another person. Baptism and faith go hand in hand. Faith receives the promises of baptism. So faith does not refuse baptism. A believer who refuses to be baptized is not a believer. The dead are dead, their fate one way or another sealed. Nothing can be done for them now.
 And just as it is appointed for man to die once, and after that comes judgment, Hebrews 9:27 (ESV)
So Paul says again all is in vain if the dead are not raised. Everything he has suffered everything he has done. It would be better to eat, drink, and be merry in drunken orgies now before we die, if the dead are not raised. So he admonishes them to wake up from their drunken stupor, and to stop sinning, for some have no knowledge of God. He says this to their shame. Again the Christian lives so that others may come to knowledge of God. We avoid sinning where we can out of love for our neighbor, so that they can know the love of God. The chief sin in this matter is the preaching of false doctrine, in this case both the baptism of the dead, and the preaching that the dead are not raised. False doctrine leads people away from God. It despises the grace of God. We do not show love to our neighbor when we treat doctrine, and the word of God with indifference. But we show love when we teach them about the grace of God that has saved them from sin, death, and the power of the devil.