Mormonism is extremely concerned about whom you interact with. Mormons know how easily it is to be influenced by friends and associates, and the influence goes both ways. That's probably why Mormons advise the youth of the Church to "choose friends who share your values so you can strengthen and encourage each other in living high standards" and to "invite your friends of other faiths to your Church meetings and activities". The Church doesn't want to lose the youth to the non-Mormon influences of others and would instead like the youth of the Church to have a heavy influence on their friends in order to convert them. There's nothing incredibly odd about that approach. It's called protecting your interests.
The real problem of all this is how it plays out on the ground. The reality is that choosing "friends who share your values" typically translates to other Mormons which fosters Mormon insularity. Non-members, non-believing members, and even believing members coming from a part-member family are often excluded a priori from the friend list. Even a seemingly innocent relationship might actually be the water hole of a "spiritual crocodile" who will be your downfall.
This is not a spiritual crocodile.
"These spiritual crocodiles can kill or mutilate your souls. They can destroy your peace of mind and the peace of mind of those who love you. Those are the ones to be warned against, and there is hardly a watering place in all of mortality now that is not infested with them." (Boyd Packer)
It's fear mongering that continues to this day.
"Now, a word of caution to all—both young and old, both male and female. We live at a time when the adversary is using every means possible to ensnare us in his web of deceit, trying desperately to take us down with him. There are many pathways along which he entices us to go—pathways that can lead to our destruction." (Tom Monson)
Mormons stick to themselves for fear of having to suffer or - Lord help save us! - be seduced by opinions that are unsympathetic or antagonistic to Mormonism.
But it's more than fear of your spiritual downfall. There is another very practical reason to avoid non-Mormons, struggling Mormons, and unorthodox Mormons: you might not get a temple recommend! Question number six, to which you must reply in the negative, asks
"Do you affiliate with any group or individual whose teachings or practices are contrary to or oppose those accepted by The Church of Jesus Christ of Latter-day Saints, or do you sympathize with the precepts of any such group or individual?"
Yelp! Does this mean you can't affiliate with your beer-drinking uncle? Does this mean you can's play sports with that one guy who's always trash talking Mormons? Does this mean you can't have your daughter over for Thanksgiving because she has a profile up on "I'm an ex-Mormon" and got married to another woman? Are you really a good Mormon if don't cut your ties with the pant-wearing, Ordain Women-supporting Feminist Mormon Housewives?
(I know, I know! This shirt's about having sex, not turning friends and family away.)
How many people give relationships up because the Church teaches them to avoid diversity? Why would anyone want to belong to an organization that tells you who you should and should not accept into your life?