I think this trope has a weird way of peeling back layers. It starts with this totally transactional agreement, right? Two people pretending for an audience, be it family, an ex, or the public. The loyalty isn't there at all at first, it's just a performance. But the hidden part comes from what happens off-script, when the 'audience' isn't looking. One character covers for the other's real insecurity, or remembers a fake detail they invented together to keep the story straight. That act of remembering a shared fiction, protecting it, becomes the first seed of a real, private bond.
What gets me is the trust isn't about big declarations. It's in the tiny choices. Not correcting someone when they slip up in front of others, keeping their real crush a secret even though you could sabotage them, quietly adjusting your own life to maintain their cover. The loyalty builds in the negative space—in what they choose not to do to each other. That silence and inaction between fake partners often speaks louder than any vow between real ones. After a while, the line between protecting the lie and protecting the person gets hopelessly blurred, and that's where the good stuff lives.