Although many medical organizations speak out against moonlighting, many residents work extra hours outside of their formal residency, either to earn extra money or as a volunteer in underserved areas.
Performing a pelvic exam without consent on an anesthetized woman, even for teaching purposes, is unethical and considered sexual battery in some jurisdictions.