I didn’t know about baptism by desire that’s an interesting doctrine.
In antiquity, especially during the time of the persecutions, that there would be people who desired to be Christians, were in the process of catechism (catechumens), or otherwise were going through the conversion process. But circumstances prevented them from receiving baptism. For example a catechumen being arrested and imprisoned, then put to death during persecution--they were catechumens and therefore had not yet received baptism. But it seemed insane to suggest, therefore, that this person who just suffered a martyr's death for the sake of Christ would somehow be deficient in salvation. Thus "baptism of desire", and also "baptism by blood", were ways of putting into words the idea that God is not callous, strict, and deprivating of His grace, but that in God's absolute power and grace we can be confident that He who moves and acts through the ordinary means of baptism has still moved and acted in the person who--had they not been denied access to baptism--would have been baptized.
Lutherans don't normally talk about "baptism of desire" or "baptism by blood"; but we do talk about the distinction between God's ordered power and God's absolute power. Martin Luther provides, in a piece of personal correspondence with one of his parishioners, an analogy. Luther points to the example of fire, that we see the ordered power of God concerning fire in that fire burns. If I reach my hand into the open flame, It burns me and causes me injury, fire burns; and yet we see in the book of Daniel that Daniel's three companions were thrown into a fiery furnace for refusing to worship the king--but they were uninjured, the fire did not burn. That the fire did not burn is God's absolute power--He who created fire to burn can also make fire not burn.
Baptism is part of God's ordered power or means, the Scriptures expressly show us what baptism is for and what baptism accomplishes, and that God acts and moves through the Sacrament to accomplish what He has promised: His word does not return to Him void, but does what He sent it to do (Isaiah 55:11). So can we say that baptism saves? Yes, because Scripture says it (1 Peter 3:21); does that mean that simply not being baptized means we aren't or can't be saved? Of course not, Scripture does not teach that, but instead teaches that whoever "believes and is baptized is saved, but whoever does not believe is condemned" (Mark 16:16). Does baptism save? Yes. Does not being baptized mean we are condemned? No.
What this really means is this: Salvation is always God's power and work, and He has provided us with knowledge of the ordinary means by which He does this, that we might look to them and hold confidently to His promises. For in Word and Sacrament God has provided external promise which we can depend upon because God's promises are irrevocable. But it is not as though God can't do and can't act however He so wills.
So, then, must a person have faith in Christ, be baptized, to be a Christian and an heir of salvation? Yes. Thus say the Scriptures.
Does that mean a person who has never heard of Christ, or a child who died in miscarriage, or many other possible horrible and often tragic scenarios become excluded from the hope of salvation that is in Jesus Christ for the whole world? Of course not. But we can know where God does act and speak, but we cannot know what we do not know--and thus must rely entirely on faith in God's grace, goodness, and judgment on all things. For in the end, God alone is Judge and Savior, and glory be to Him that He is the One who judges the living and the dead, for He is exceedingly merciful.
The concepts of "baptism of desire"/"baptism by blood" can be, in that sense, seen as fitting into that larger paradigm of the distinction between the ordered and absolute power of God. The real point being: We can't put God in a box, we can't say what God can't or won't do, because we're not Him. We can, however, speak of His promises, speak concerning what He says in His word, and rest confidently in the Most Merciful and Loving Savior.
-CryptoLutheran