Some of it does, but most of it does not. I believe most residents make something like $50k-$60k/year, and work ~60-80 hour weeks.
https://www.reddit.com/r/Residency/comments/hdx3gw/no_laughi...
https://www.reddit.com/r/Residency/comments/hdx3gw/no_laughi...
Based on what I've read, I suspect residents are very profitable for hospitals, even if they use a significant portion of the grant.