The main purpose of this legislation, known as the Conscience Protections for Medical Residents Act, is to ensure that medical residency training programs funded by Medicare cannot require participants to undergo training related to abortion unless they voluntarily choose to do so. This act aims to protect the rights of medical residents who may have moral or ethical objections to participating in abortion training.