How common is it for a student to finish a Master's degree at a school and to be rejected for a PhD at the same school?
One very obvious thing would be availability. My department has around 100 masters students each year, but will only have 7 PhD places. We pretty much take as many masters students as we can (because they pay). As you can imagine, this is not always popular with the people that have to supervise them for their dissertations.
Master degrees are funded by the student (either directly, or via a loan). PhD positions are funded by external funding bodies or scholarships.