Birds of a feather do flock together for protection. People flock together too, but for different reasons.
The preference for similarity is instinctual. Infants, who are not even a year old, display a preference for people who share their same likes and dislikes. We like to be around people who are just like us. It makes life easier when everyone is on the same page. Thinking alike reduces conflict and makes doing things, even simple things, like going out for dinner, much easier. Take a look at your friends. They are a good reflection of who you are.
Not only do we seek out similar others, but there is a lot of pressure to conform to the norm. People have a fundamental need to belong – we want to be accepted by our peers, so we tend to mimic their behavior.
The preference for similarity and the desire to conform to the norm apply to infidelity. People, who cheat on their spouses, are more likely to be friends with other cheaters. If you are friends with people who cheat, you are also more likely to cheat.
As with every thing else in life, picking your friends wisely is good thing to do. Our friends not only influence our physical health, our social habits, our weight gain (or loss), but also our likelihood of being faithful.
Be mindful of the company you keep. It has large impact on how you behave.