WHY does God allow some women to have miscarriages
Coming from an atheist, I'd say God doesn't do it. But to get to your actual question, I'd say to look at it this way (and yes I'm stealing this from Howard Stern's "Private Parts" movie). Your body knew something was wrong and it had to do what it did for you to survive. But sometime soon, you'll try again, and this time, you'll do just fine because you'd know that if something was seriously wrong, your body would reject it.