There is great risk, double-edged sword to creating free moral agents with great capacity for love and evil. God does save infants because they cannot reject Him. It would be unjust to condemn those without moral and mental capacity. Can a baby murder someone and go to jail? If a baby knocked a gun that killed his sibling, the baby would not get the death penalty.
It would be murder and sheer utilitarianism/pragmatism (vs biblical ethics) to kill babies to spare them from hell. The human race would cease to exist. Using this logic, God would be better off not creating because many would go to heaven, but others would go to hell. Using this logic, parents should never have kids because a few may turn out bad. In this case, the end does NOT justify the means. It would be morally wrong and contrary to God's wisdom/ways/creation mandate to do this. If it was righteous, God Himself would do it, but He does not. The sin of abortion or murder is not justification to possibly spare a child from turning out bad.
So, God could have not created, could have created robots, or He could create beings with capacity to love or hate and the respective consequences. Despite the grief it caused Him (dying for His creation; tolerating evil until judgment), love was seen to be a higher good, worth the risk. He will triumph over evil in the end, but there will be those who will not share in His glory (however, there will also be many, many who will know and delight in God). There is still a choice and God has done everything He needs to do to redeem us. There is nothing unfair about babies going to heaven or adults going to hell. There is nothing right about killing humanity and playing god to save some from hell or evil. God has already done that in the cross. This is why men are without excuse for rejecting His perfect provision (Rom. 1). Love does not coerce, so God will not force people into heaven or out of hell. Again, nothing unfair in all of this, just the wisdom of God.