Are you asking why roosters do that? It is both an intimidation to other roosters, but it is an enticement for the hens...Somehow the sideways shuffle means look at me, I'm a big strong rooster.
I just had a cockerel start crowing, and he keeps dancing up to my big rooster.