[url]http://www.ar15.com/content/parts/upperreceiver.html[/url]
The flat spring holds the aperture tightly in place on the housing. The horizontal side spring and detent in the front of the housing makes the sight-housing track the right side of the upper (read canted/slightly twisted). The spring in the sight housing threads keeps upward pressure on the sight housing and pushes the housing and elevation knob tight against the upper receiver knob slot (seen by removing the charging handle and looking up threw the housing elevation threaded section with the receiver cross roll pin keeping the spring in position).
If you are having problems with the sight housing just twisting, it's normal and part of the design. If you mean that the housing will stay forward, then slightly move reward, then twist in the upper when fired, you have a bur or the housing base has uneven contact with the upper receiver housing area.
When the elevation threads are new, there are burs in the elevation thread slot that will slightly bind and keep the sight forward. If the sight housing is not raised to clear the base before zeroing, this can cause the sight to be pressed forward. After a few shots, the housing will move into the correct position, being slightly back and slightly twisted due to the force of the springs. The solutions to solve these problems are to move the front sight post down one or two clicks down, then to re-zero the rear sight a few clicks higher. This allows the housing base to rise off the upper receiver base area (read free float from the upper), and allows the springs to apply full forces without the housing base contact/burs pressing the housing forward and over riding the spring pressure.
To re-adjust the rear elevation settings, you will need to loosen the elevation wheel set screw (knob is a two piece design) threw the small hole just in front for the aperture, then move only the lower section of the knob and retighten the setscrew once zeroed.
Bottom line is a standard AR-15 rear sight housing is slightly twisted on the upper with the base of the sight housing not in contact with the upper housing below the housing (pressure is at the elevation knob to the top of the elevation knob slot). This allows the sight/housing to track the upper to allow the sight to be repeatedly re-zeroed to any given distances.