Take Pete Campbell from Mad Men for example.  He tries to betray Don Draper and get him fired by revealing Don is not who he says he is, but ends up failing in the end.  Bert Cooper gives Don the option to fire him if he likes, but tells him that he would hold off.  "One never knows how loyalty is born" is what he advises.  As it turns out, until the end of the series, Pete Campbell becomes Don's ally and advocate no matter the situation.
Now why would that be the case?  Rather than satisfying some "friendship trope", we can see the reasoning behind why Pete might act this way based on his dialogue and his interactions with his family.  He is constantly reminded that he was hired because of his family name.  His family reminds him that they gave him his name and that's all that matters.  And he does have a distinguished family name.  But Pete makes it clear through his words and actions that he wants to be lauded on his own merits and efforts.  Not because of who his family is.
Which gives us insight into why he probably ends up sticking with Don.  Despite Don stealing another person's identity, he is judged by his boss by the person he is right now in the room.  Don has no name, and yet is judged to be worth keeping around.  Why wouldn't Pete try to follow his example to get what he's always wanted?