Then why did he create us in the first place if He was going to live our lives for us? I'm not going to get into a theological discussion here, but I hear this type of argument a lot. It applies to 5-month-olds because they are dependent on adults and all of us live together in society. I can understand the question, though. Life--living it and understanding it--is not easy.
I think your question is valid for adults, but not for babies who are totally helpless. The mother and child are two separate human beings with two separate souls. The mother is responsible for her actions and must live with the consequences. But the baby neverhad a chance and doesn't have a life anymore.
I can understand the premise that the Lord would not interfere in the free will of the adult, but at 5 months no one can argue that the baby had any opportunity to exercise free will. So did the Lord want the baby to die? Or does He simply not involve Himself in our affairs? Or does He not exist at all?
If we assume the Lord gave the child life, why snatch it away so soon and in such a horrible way? Admittedly, there really are no answers, only faith.