Endear (to) comes very close, though it isn't automatically a two-way connection. From Dictionary.com:
to make dear, esteemed, or beloved:
He endeared himself to his friends with his gentle ways.
For your example sentence, you would need to make the endearment reciprocal:
The two friends were endeared to one another by their shared experience.
It is occasionally possible for an inanimate object to endear itself to someone (e.g., "the movie ET and its title character endeared themselves to a generation of children"), but it is pretty exclusively used for an emotional response. You wouldn't say that *"glue endeared glitter to the card" or anything like that.
Some actual examples of this usage:
Nightly through the long months of summer did the lovers keep their tryste, parting only after each meeting more and more endeared to one another.
—"Waw-o-Naisa, or, The origin of the whippoorwill", The American Monthly Magazine, July, 1836
Christine and I also share crazy similarities in our life stories which has made us particularly endeared to one another.
—Unposed Blog, August, 2017
Men will become endeared to each other while they are fighting together in the trenches of struggle, and when Ian attended a course in Pretoria instructed by Andre Thorburn, not only was a big step taken in Ian’s knife making; but something else was forged: a friendship.
—The Cutting Edge (custom knife website), ND