Presumably the same phenomenon which makes yawning contagious. In which case, don't hold your breath because I've never managed to find a credible explanation.
All animals constantly learn and re-learn behaviour from other members of their group.
This reinforces the group identity and makes members feel safe. Brits living in the US thus start to drawl like Yanks and a pup acquired at the same time as kittens will believe it can be picked up and cuddled on the lap, however big it is. Hanging out with any group will give you their habits, but only temporarily. When you return to your normal company you'll soon be reminded of how you 'should' behave. So if you momentarily pick up a stutter it'll disappear at the first sign of surprise from your mates.