Theology creates records. To understand the theology behind a practice is to fully understand the records generated by that theology.
The Utah Mormon theology behind “baptism for the dead” is pretty straightforward from their perspective. Baptism by full submersion by the Mormon priesthood authority is essential for salvation. This includes the living and the dead. A living person stands in proxy for the deceased and the baptism is preformed in one of their many temples. Concerning the dead, they see the Mormon message being taught by missionaries (who are also dead) in the next realm before the final judgment. There the spirits of the dead can accept or reject the message. Baptism for the dead takes care of the fact no one knows who has accepted the message or when they are taught. If they accept, the baptism is there for them.
To keep track of the literally hundreds and hundreds of million names taken from the old records, and family knowledge, indexes needed to be kept. Otherwise someone else would perform the baptism again (which still happens).
All genealogists utilized these vast databases of names in their research. Most are familiar with the International Genealogical Index and to a lesser degree the older Temple Index Bureau. Other early pre-technology recording programs included the Family Group Records Archives. The current programs are stripped down and the date the baptism was preformed taken out. The down side to this is that if you have an Irish relative baptized in the 1865 and that deceased person was born in 1725, this may be the only place that information is recorded. What this usually means is that there was a branch of the family who joined the Utah Mormons, and took their genealogical duties serious. This is excellent by genealogical standards!