The few times I've noticed people doing this, they imitator tends to fall into either one of three categories. First, they might be suffering from low self-esteem and therefore do not believe their own thoughts, feelings, and behaviors are good enough. Or, they want to fit in with a certain "type" of person, and that won't be possible if that person is not accepting of him/her having their own thoughts. Thirdly, the imitator might simply be overwhelmed by someone's "charisma," either negative or positive, and rather than go against the tide of that charisma, it's easier to just succumb to it.
They might not even recognize it as copying...they usually do it kind of innately. Kind of like how the Pied Piper, or a svengali just get people to fall in line.
Mmmmm it's late, so my powers of thinking and communicating are diminishing. Hope more people pitch in with ideas...great topic!