Something like 1 in 4 pregnancys end in miscarriage- I know that seems really high, but the figure has gooten so high now, because people find out they are pregnant so soon. In times gone by, women would just have what they thought was a heavy period, or be a little late, none the wiser that they were ever pregnant at all.
Some times it just doesn't "take"- and there's no explaining it, or doing anything to prevent it happening again. It's very, very common, and has probably happened more times than anybody realised -it could've happened to me, other women on the forum, or even happened to you before.
I remember passing a big lump of something strange during a late period- it was definately tissue of some sort, not a blood clot- i'm now almost certain that it was an early miscarriage. At the time I didn't take an especially huge amount of notice.
Try not to think about it too much. Keep trying for a child, if that's what you want, sometimes the body just does a "trial run" before you have a baby. At least you know you can conceive.
Good luck