There's a big difference between "some adherents do this" and "the Church urges and encourages [shunning]". The exact opposite is the case. The Church heartily
discourages shunning and teaches people that their good example and continued friendliness is
even more important for people who've gone off the path than people who are still on it, children and relatives not excluded.
Children taking foray outside of the faith's bounds is by no means rare. It happens all the time in Utah. Many faithful adults in Utah were such teenagers/young adults themselves and understand that patience and kindness will win the day and help the child find the path back.
Check anti-Mormon forums and they can't stop whining that, far from being shunned, publicly embarrassed, or harmed, the Church continues to send welcoming representatives to ask if they'd like to come back. They also regularly complain that their own family members continue to invite them back. I'm sure that can get annoying after you've made your wishes clear, but it's basically the opposite of shunning.
In my large extended Mormon family (14 aunts and uncles, over 50 first cousins, hundreds of second cousins, etc), probably 65-70% of them no longer practice the faith. I don't know of a single individual who has been shunned. Everyone continues to be welcome to all family functions, everyone continues to discuss and share. The process of someone leaving the faith is not easy and may be painful for both sides, but cutting off communication/shunning people is heavily discouraged, and it doesn't happen often.
Some faiths do require or encourage shunning, including Jehovah's Witnesses, whom Mormons are often confused with because both use door-to-door missionaries, but Mormonism is not one of them. It's a very important distinction.
I lived in Utah for a long time and worked with many mixed Mormon/non-Mormon groups. Everyone seems to get along very well and respect each other despite differing beliefs (with only a few very rare exceptions).