The bobbing behavior keeps the head still and in one spot as long as possible. By keeping the head still, the bird gets a better look at the world and is able to see things more clearly. It can focus on one spot for a longer period of time. The head bobbing of birds allows them to detect movement while they are moving too.