Question: Since many children die as soon as they are born, what’s the purpose of a newborn baby who dies after some minutes? Why does God give or insert a soul to children who die as soon as they leave the womb?
Answer: We might ask a similar question about people who never develop mentally and emotionally enough to come to know God (at least, we can’t tell that they have). I think the answer lies in the fact that God has a purpose for their lives and quite likely they are received into His care in heaven upon death, so their eternal purpose is clear, but their short or attenuated lives serve a purpose in how we receive them or experience their brief time with us or how we care for them as those who never fully develop. They have a purpose in our lives that is crucial for our development.
We learn something about unconditional love and about grieving their loss that is important to our growth as those God has ordained to be conformed to the image of Christ (Romans 8:28-29). Of the man born blind mentioned in John 9, Jesus said that his blindness was for the glory of God. Yes it was painful for him and for his parents and others, but his healing resulted in God receiving glory. In the same way, the stillborn or short lived newborn, brings glory to God as the parents and family continue to trust or learn to trust God and give testimony to His goodness despite this tragedy. This in turn speaks to those outside the family who may need to see this hope that exists despite what seems a hopeless situation.
It is when people see that hope does not reside in our circumstances but in our God that they are able to see that their own hope must rest in God and they may then be on the way to believing in Him for salvation. Peter said to always be prepared to give a reason for the hope that is within you (1 Peter 3:15) and that is most likely to be required of you when you face tragedy with hope in Him. Unbelievers will want to know how that is possible and you will have the answer.