I just graduated fellowship and have been involved with fellowship interviews and rank list decisions during my fellowship.
If someone is a good resident and applies for our specialty, we want them for the fellowship because they're known, they know the system--it's easier all around. But we've also had some not-so-good residents that we've worked with who wanted our specialty for fellowship. We still interviewed and ranked them, but they were dramatically less preferred than if they had been an external candidate. We also get some amazing outside applicants that we would really like and can rank above our internal applicants.
For jobs, my division director told me he'd give me the open position if I wanted to stay even though there were other applicants interested in it. One of the fellows who is getting ready to graduate was on the other side of that, interviewing at places where they had an internal candidate that was preferred, but hadn't made a final decision yet. That said, we have some fellows that we would not be inclined to make a position for if they wanted to stay.
One of my friends from residency couldn't get the support of our home program to apply to a specific specialty and I think they burned a lot of bridges as a student in that division. They went elsewhere to work for a year and got amazing letters and are now finishing up fellowship at a good program and going to do a super fellowship next year at another good program.
So, 100% works both ways even within the same division.