It was a selfless act in a self-oriented culture influenced by a belief in the sanctity of life.  No way either parent could foresee their child's short life. And if you want to play "what if" then what if the child had lived and was destined to become another Madam Curie or Mother Teresa?
It is fatalism to believe that all that happens is the will of God. 

The unfortunate and sorrowful circumstances are mitigated for Christians in the belief that mother and child are united now in the presence of God and Christ, the Savior.