I think this is one of the most important things to teach your children.
My mother had a saying : "Tell me who your friends are, and I will tell you who you are..."
I didn't understand it when I was real young, but she kept repeating it like a prayer.
And eventually it made me look at who my friends were, and in some ways it made me think about whether they were who I was ...
LOL
I started to gravitate towards those whom I wanted to be like, partly so I could please my mother, and partly so I could get better at sports or school subjects.
And indeed it was a self fulling prophecy.
So of course I told my kids!
They didn't always listen, but eventually they did, and adopted a version of their own: "Birds of a feather flock together."
Kids always make stuff up thinking they are clever to invent something new.
I didn't have the heart to tell them that is an old saying.
So I didn't say anything to spoil their fun, and just acknowledged the win.
:)
If a person understands this early, (although youths usually do not) I think their progression will be less problematic and potentially they will have fewer "lessons" to unlearn later on.
It's good to hear your kids understand the concept and thankfully they invented a new (old ) saying. Lol