I don't think of it as nepotism - if I know someone sucks from working with them, you better believe I'm making sure I warn everyone if I see them in the pipeline. It's not about pulling friends, it's about pulling people you know are good.
If you've worked for a few months on a team with a competent, decent and reliable person, you'll give this person a huge preference over someone unknown, even if on paper the unknown looks better.
Well yes, "trust" is the entire point of nepotism and why its a thing.
The idea is we place our guy in that spot so that a) our guy gets to reap the benefits of the cushy job we lined up for him. b) when conflict arises between our interests and the organizations we can count on our guy to do the thing we want.
The thing I am describing above is much more benign. It's literally HR asking people in the company if they know anyone they would like to refer and then taking the referrals seriously.