Formula Dancing

I was watching the Toyota Grand Prix of Long Beach and i noticed that when they did the first caution lap, all (or at least most) were sharply turning back and forth. They all looked they were part of a fast pace dancing session. Is this to just have fun, or does it have some mechanical advantage?