uhh...sorta?
the military match does consider prior service. prior service in the medical corps (usually as a GMO) counts more than other types of prior service. either way, it's not enough to make a poor candidate into a good one, but it can permit a marginal applicant to match into a specialty that otherwise would have been out of reach.
if the person with whom you spoke separated from the military and then did a residency, then he almost certainly served as a GMO, meaning he would have had the prior service box checked on their military residency application. if he was unable to match, then he probably simply wasn't competitive enough for it in the military. that last bit is underscored to highlight the fact that competitiveness for a specialty in the civilian and military worlds is often incongruous, as evidenced by the fact that he was apparently able to match quite well outside of the military.
he was also probably aided by the fact that military service is, on the whole, considered a bonus to PDs.