Why do People Rock Back and Forth?

People may rock back and forth for some reason. Babies rock back and forth as a sign of possible autism. Adults rock back in forth when they are in pain or perhaps rocking a baby asleep.