I have always considered it a bit of a miracle that anyone makes it out of the uterus with all of their fingers and toes and most of their organs in the right place. There is a narrow window each month of just 2-5 days during which you can get pregnant. The egg and sperm have to be in good health. The egg lasts for about 24 hours from the time of ovulation until it starts to die. The sperm had better be mobile, or else they are in for a rough time in the hostile environment of the uterus. They have 2-5 days to hustle it into that fallopian tube. Too early and with scarring in the tubes and you may have an ectopic PG. Too late and the chance is missed.
If you happen to fertilize, then the uterus needs to be in good shape. It needs a nice healthy lining, no anatomical weirdness and the right milieu of hormones to get things cooking. If the implantation occurs, you're on the way to PG...if there aren't any chromosomal abnormalities. Even after the implantation, it is still possible that outside factors, like illicit drug use, infection or chronic medical problems, can make the growing embryo scream, "Mayday!" and decide to abandon ship, so to speak. Throughout the rest of pregnancy, things must happen in the right order so that a nice healthy babe is the end result. So I am continually amazed that this happens enough of the time to create enough people on this planet and on my congested commute to work to make me want to scream, "Mayday!".
We Homo sapiens seem to have one of the lowest fertility rates on in the planet, averaging 2.1 children per mother (in the US) and taking about 16 -30+ years (or longer) to raise them to independence. As many as 10-40% of all pregnancies end in miscarriage, which means that most women will have one at some point in their lives. Wait a second; calm down and keep your pants on. Let's break it down. About 10-20% of PGs end in miscarriage, but those are the people who actually KNOW they are PG. The other 20% of the miscarriages are estimated to occur because most of the time, they occur before you have a chance to miss a period.
The concept of a "chemical pregnancy" or a "blighted ovum" likely arose after the invention of the home pregnancy test. You put the power of peeing on a stick in the hands of a woman who is trying to get pregnant and you can see the madness that is about to ensue. Just think of what happens at Filene's Basement during their wedding dress sales and you will see that giving a type A woman the ability to know when she is pregnant before a missed period can be a recipe for anxiety.
So what happens is that the egg and sperm meet up (how you doin'?) and for some reason, the placenta develops (the early placenta releases the chemical HCG that is detected in a PG test) but the embryo does not. This results in an empty gestational sac and no viable PG. Read more about it here. They are usually due to chromosome abnormalities. (Another reason that the human body is amazing. It "knows" when something isn't right and it will get try to remove that something to restore things to a natural order. Sort of how it need to "get rid" of your stomach contents after doing too many tequila shots.)
Most sources and OBs that I have talked to recommend waiting 1-3 months to TTC again. Some suggest waiting longer if time is on your side or if it was an emotionally traumatic loss. The majority of women with up to 3 early PG losses will go on to have a normal PG. It is one of those cruel tricks of nature that we spend most of our teens and 20's trying to NOT get PG, only to have anxiety when it doesn't happen easily. Nature sucks sometimes.