Hospitals will pay their own money for residencies in specialties that are wildly profitable. Usually, some fancy types of surgeons. Primary care, endocrinology, rheumatology, and a lot of other needed specialists are not so the limited slots are whatever the government will pay for.
Yes, that is what I've heard. During Obama's presidency, they increased the number of medical schools or openings at the existing schools but did not increase the number of residency positions.