Is the practice of Mormons baptizing for the dead scriptural?

1 Corinthians 15:29 seems to show that the Mormon practice of baptizing for the dead is scriptural.

In other words, a person baptizes in the name of their deceased loved one, so that their soul can be resurrected and
go up.

However, the Bible points out that the baptism for the dead in 1 Corinthians 15:29, it says “else what shall they do
which are baptized for the dead.”

It says, baptized for the Dead.

It’s like being jailed for stealing, taking Advil for a headache.

So the word for is “because of.”

So baptism is practiced because it’s supposed to represent a resurrection of the Dead.

Notice It’s the dead rise not.

So it’s not the soul rising out.

It’s obviously the body rising out, in the context of 1 Corinthians 15.

It says “O death. Where is thy sting? O, grave. Where is thy victory?”