For example, if you are from anywhere else in the USofA (or the world) and spend some time in the deep south (Alabama, Georgia, Louisiana, etc.), though you may not pick up the accent, you will start to use common colloquial phrases in speech as your way of blending in and perhaps even being accepted (though you'll never really be a Southerner, but I digress). That's just one aspect of mirroring, though it can go much further such as using intonation, accent, and even physical gestures mimicking the other person's in order to establish a greater rapport and level of trust. It's written that mirroring is one of the most useful techniques in NLP.
NLP, or Neuro-Linguistic Programming, per Wikipedia, is "an approach to communication, personal development, and psychotherapy created in the 1970's. The title refers to a stated connection between the neurological processes, the language, and behavioral patterns that have been learned through experience and can be organized to achieve specific goals in life." A fancy way of saying it is a body of knowledge and skills used to get along with others.
The most fundamental reason for getting along (including perpetuating the species) is to be a part of a larger group. That is, to gain the benefits derived from being part of a group that can do for all what one cannot do for themselves. Be it large (local, regional, or National Government for example) or small (Bridge Club, Neighborhood Watch, etc.), belonging is a critical need for all manner of life from people to animals, insects, trees, coral reefs, etc. Check out Maslow's Hierarchy of Needs for one pass at this concept. Even his most fundamental needs, so called 'deficiency needs' before self-actualization, require at least one other person. Hence, we need to learn to get along with others. Or at least one other.
In an effort to relate to and understand others, and feel part of a local (or wider) group, we need to learn the rules, boundaries, and methods that group uses to stick together. To make relationships work requires a knowledge, learned through experience or schooling, of many different subjects: language (including body language, socio-linguistics, etc.), psychology, law, ethics, morality, etc. When I was young and, I suspect, when many of us were young, I heard the admonition, usually after some minor dispute, "You need to learn to get along!" Exactly so, we need to learn to get along. The question is how? How do we learn to understand others when, for the most part, we don't always understand ourselves.
The process of learning to get along with others actually provides the perfect opportunity to learn more about ourselves. However, just as we don't always learn from our failures (or successes), similarly, we don't always recognize ourselves in others. But we should because, as it turns out, we tend to "hang out" with people of similar desires, needs, and proclivities.
When, especially in a foreign country, people find themselves amongst a group "not like us" they will tend to congregate with those "most like us". In the US during the years of mass immigration to the New Country, there sprung "Little Italies" and "Chinatowns" that still exist to this day. Extreme examples of being with people "just like us" usually, but not always, center about religion such as the Pennsylvania Amish and Belize Mennonites where, generally, outsiders aren't allowed to join. And this, in my view, is the danger of hanging out with people most like us: hanging out only with people most like us.
It takes a much greater effort to join a group "not like us", even when that group willingly accepts outsiders. We have to trust the original members are genuine in their desire to welcome us and we must push our abilities to understand the rules, psychology, and sometimes even the language necessary to be an accepted member of that group.
Successfully living overseas requires a sense of adventure, an open mind, and more than a few skills. It is not for everyone. I recall an extreme example of an unsuccessful expat who never left their little compound except to go to McDonald's and Pizza Hut - the two "American" food places in town. They lived in Singapore, a country renowned for cultural integration (and an incredible variety of food!) They missed so much.
There are international groups that lend themselves to an easier acclimation to overseas life. Rotary International, Scouts, Masons, Seventh Day Adventists, and more that prove a quick and relatively easy way to get that feeling of "belonging" and from there become active in the greater community.
There's certainly nothing particularly wrong with being part of the "expat groups", whatever guise they may take. Most of us have a need to be part of a "comfortable" group for which the entrance requirements (rules, boundaries, language, and so on) are already known and therefore easily met. It's not uncommon living overseas to seek such comfort with a group of "compatriots" even if they hale from a slightly different neck of the woods.
Unfortunately, there are some who take that as an end all enabling (or preventing, depending on one's point of view) them from becoming part of the larger society in which they now live. Sadly for them, they will miss all the wonderful experiences life overseas can bring and, by not learning about others, miss an incredible opportunity to learn about themselves.