It is a way to counter the temporary imbalance while walking. This is why we move our arms opposite of our legs. Our arms act as counterweights to our legs.
Try walking with your arms at your sides. It's awkward as hell. And it feels unbalanced.
I dont really know. I guess its a habit some people have. Like me! :D
For ^^^ that reason and for circulation