Theodicy is a word first used by Liebnez in the 18th Century. It is the attempt of human beings to reconcile the idea of an all powerful God who is also infinitely good with the reality of evil in the universe. The attempt to do that long predates Liebniz, of course. It is famously addressed, and most satisfactorily in my opinion, in the Book of Job. Of course, there is no real conclusion there. For those whose recollection of Bible stories is misty. Job was a good man and a servant of God. The provocateur challenges God suggesting that Job is good and a believer only because he is wealthy not only in material things but in family. So God allows the provacateur to strip Job of everything, even his health, but Job still believes and still loves God. When Job seeks an explanation, God shows him the universe. And Job's heart is satisfied. And, P. S., God gives him back a lot of material things so its not so bad after all.
My point in referring to the Job story is to let you know that the effort to reconcile the idea of a God who is all powerful and all loving with the evil in the world has been going on for a long time.
Some part of the answer has to do with the idea of free will. God did not want a bunch of automatoms that he would completely control. He wanted independent beings who freely choose him. Augustine and Aquinas discuss the interplay of free will and evil at length. They regard evil not as a separate force but as a rebellion against God.
So what does this have to do with Richard Mourdock. Well, it has a lot to do with his statement about abortion. To say that God intended life does not mean God intended rape. God allows but does not cause evil. The rapist is violating God's law. But something beautiful can, nevertheless, result. That is what Mourdock was trying to say.
It is like the story of Joseph. Joseph, you may remember, was the favorite son of Jacob, one of the great patriarchs of the Bible. His brothers became so jealous of him that they conspired to kill him and then decided to relent and sell him into slavery. So he is taken to Egypt where he becomes very successful and the right hand man to the pharaoh. He is so wise that when famine comes, Egypt has plenty of food. Not knowing that he is still alive, his brothers are dispatched by their father to Egypt to buy grain so that Israel can survive. After they buy the grain they are made aware that this guy selling them the grain is the brother they sold into slavery and fearing they might get from him what they deserve they are trembling. But Joseph tells them not to be afraid. He says to them, you meant it for evil, but God meant it for good. The moral of the story is not that God caused the evil but that he redeemed it. He made something bad turn into something good.
Just so, something that was evil, a rape, may be turned into something good when a beautiful baby is born. The baby is an innocent life. The fact is that many women who have been raped and become pregnant not only choose to carry to term, but raise their babies. Here is a thoughtful discussion by a child born of rape. I hope you will read it.