I've seen this "swirling" of rifles (sorry, don't know a better word for it) before and have always wondered about the reasons for it. Is there a purpose to this exercise or is it just meant to look impressive? It certainly does.
It's a stylized version of close order drill. This is the way that armies moved from place to place. Although we don't go into battle like that any more, I'm sure it remains an easy way to get from place to place.
The military drill teams build on the standard movements of close order drill in order to create these choreographed performances. Still, many of the elaborate movements are closely related to actual, functional actions. For example, you often see the Marines exchanging their rifles, dramatically throwing them back and forth. This is based on an ordinary inspection, in which the Marine being inspected performs a set sequence of movements to demonstrate that his rifle is clear (and that he knows how to do it). Then the inspector takes it, checks it out and returns it to him. This is a pretty basic set of actions that Marines learn and do in Boot Camp. However, the Silent Drill version is much more dramatic. Basically, it accomplishes the same thing.
The navy drill team (I'm not sure if there's more than one group) does demos about once a week at the navy memorial in downtown DC (across from the National Archives). I like to go down there and check them out. They usually pull members from the crowd and throw those rifles w/ bayonettes around them... always awesome.