I've been curious about this, and it might not belong here, but I'll ask anyways.
For most modern weaponry that I've seen or used, it appears that the magazine is always placed below the barrel of it. Instead of the magazine going on top of the gun, per say, the magazine is placed below the gun barrel itself. For example, the default assault rifle used in the US military is the M16:

As you can tell, the magazine is below the barrel of the gun, and bullets are loaded in one at a time into the chamber.
What I'm curious is to why bullets in magazines are placed this way. I've had friends who say that physics plays a role, in that if you put the magazine on the top, gravity could force an extra bullet into the chamber and cause a misfire. But isn't putting the magazine in the top more efficient? Letting gravity do the work?
Some guns like the Sten, used in WWII, have a magazine that go in via a slot in one side of the gun. Most sidearms have their magazines located in the grip of the gun.

Why was this implemented? Is there some aspect of physics that allows an optimal entry point for bullets to go in the chamber?
Edit:
Based on a chat in Arqade's room (The Bridge), it seems there are very few guns that actually have magazines inserted from the top. The only few guns we could find were the Bren (below) and the M1 Garand, although that uses an en-bloc clip that feeds up.




