There are a zillion things that have to happen perfectly right in order for a pregnancy to occur. The question is not why it doesn't work out sometimes, but why it works out as often as it does.
It is totally possible to have a string of losses and then it just seems to magically work itself out. It's also possible that people have something going on (such as blood clotting issues or thyroid) that can be easily treated.
My fear is that when there are some unexplained happenings, people panic and want to start doing stuff (understandable) but you have to do the RIGHT things. The impulse is to start taking this, that, or the other thing and if it was something that can work itself out, you can actually PREVENT your body from fixing the problem when you start throwing things at it (I would def. have you take the Vit D, though, that won't hurt a thing and may help.) The other thing to avoid is to basically do what your doctors seem to be doing and ignoring the elephant in the room while doing something that doesn't even help, yk??