Praying for souls is different from baptizing souls of those who were faithful Christians-Jews during their lives.
Not only do mormons baptize for the dead, they confirm them as members of the mormon church, "endow" them with false "priesthood", "seal" them to their dead families for "eternity"...all with the mormon belief that these covenants taking place in their temple are actually binding on God! And that the soul of the dead can/will "accept" all this chicanery in their name!
I doubt many of the original leaders believed any of this stuff. Telling someone you can baptize their dead daddy and get him into Heaven was a big selling point.