I don't do it wth habits much, but I certainly do it with accents.
Its part of empathy, I suppose - you try (subconsciously) to "fit in" with people around you.
If you never do it, that's because your own ego views you as "top dog".
There's a thing in bodylanguage that I always heard called "echo posturing". It's where people copy the manerisms of the Big Dog in their presence.
Try sitting in a meeting, and when you are talking pick up a pencil, or steeple your fingers togther - and if you have people's attention they'll copy you.
Its fun to make people scratch their noses and then point it out.....