Performing a pelvic exam without consent on an anesthetized woman, even for teaching purposes, is unethical and considered sexual battery in some jurisdictions.
Although there are various rules to the National Residency Match Program, many programs try to avoid the rules and fill residency positions through other avenues.