From Halopedia, the Halo wiki
The spinning gun is a phenomenon in Halo: Combat Evolved's weapons. The glitch causes dropped weapons to spin in circles when shot. The occurrence is actually an amusing by-product of the physics engine rather than an actual glitch.
In Halo: Combat Evolved, Bungie's weapon modelers chose to put the pivot point for their weapons at the center of the gun. Because of the way the game's physics engine works, this means that, because both bullets and guns are rigid bodies, when they collide, it causes the gun to spin, thus causing the glitch. This can also sometimes work with health packs too but shoot the edge of the pack to watch it spin.
The trick only works with dropped weapons and guns in Multiplayer; guns from weapon caches do not exhibit this phenomenon. Those who find interest in this "glitch" usually prefer to do this with an Assault Rifle, as it makes the chosen gun spin faster. It also works with powerups such as the Camo in multiplayer.