I think it is all three. I will tell you why I say this. At a dental school whose name I won't mention, there was a girl who was near the bottom of her class, and she was one of four students selected for ortho residency. Mind you, she hadn't yet passed her final set of boards, but she had one thing going for her: her dad helped build the ortho clinic. So, how do you tell her she isn't going to get ortho?
The other students selected were near the top of their class and had been the entire four years. This sort of thing goes on all the time.
People get into dental, med, pharm, and any other school there is using personal relationships based on money, family, and a host of other reasons. There is no reason why a dental residency should be any different.
To think that personal relationships don't play some role in the selection process is simply unrealistic.