I think that the LCMS FAQ on Baptism answers this pretty well:
Doctrine - Frequently Asked Questions - The Lutheran Church—Missouri Synod
Lutherans believe that the Bible teaches that a person is saved by God's grace alone through faith alone in Jesus Christ. Baptism, we believe, is one of the miraculous means of grace (together with God's written and spoken Word) through which God creates the gift of faith in a person's heart.
Although we do not claim to understand how this happens or how it is possible, we believe (because of what the Bible says about Baptism) that when an infant is baptized God creates faith in the heart of that infant.
This faith cannot yet, of course, be expressed or articulated, yet it is real and present all the same (see, e.g., 1 Peter 3:21; Acts 2:38-39; Titus 3:5-6; Matt. 18:6; Luke 1:15; 2 Tim. 3:15; Gal. 3:26-27; Rom. 6:4; Col. 2:11-12; 1 Cor. 12:13).
Parents and sponsors of a baptized child bear the responsibility of teaching this child God's Word so that the child's faith may remain alive and grow (Matt. 28:18-20).
Confirmation is a time-honored church tradition (not required by God's Word, but we believe useful nonetheless) in which the child baptized as an infant is given the opportunity to confess for himself or herself the faith that he or she was unable to confess as an infant.
Faith is not “created” at confirmation, but it is rather confessed for all to hear so that the church can join and rejoice in this public confession, which has its roots in the faith which God Himself created in Baptism.
{me now}
So, the Baptism is not what saves, but it is a means of Grace. Randomly baptizing infants without them continuing in the path of Grace does not itself impart salvation. Salvation is by grace, of which there are other means. However, Baptism of an infant imparts Grace, which is a perfect way to start a new life.