system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do most rifles use rotating-bolt system instead of straight-bolt system?

I read that the purpose of rotating-bolt action is to lock the cartridge inside the gun chamber, but isn't the cartridge locked the moment when it's inserted into the chamber ? I am still confused about the locking mechanism, like what does it do to the whole cycle of the gun mechanism ?

***Additional question:*** Semi-auto rifles had been around way before World War II, and they are known for their advantages of having better rate of fire and mostly larger capacity than their bolt-action rivals. Then why weren't they as widely used as bolt-action rifles during World War II era ?

**Thank you.**
gpt
The barrel is just a tube with a very particular shape. The cartridge can simply fall out if nothing holds it in. The bolt of a rifle is kind of like a key. By inserting and rotating, it locks. You can't rotate your house key 90 degrees in the lock and pull it back out again, and it's the same way with the rifle bolt given that the rifle is built of thicker, sturdier stuff. 

As others have stated regarding bolt action guns used in WWII despite the availability of semiautomatic weapons: bolt guns were cheaper to make and repair, accurate, already familiar to the troops, and already in use with the military. Many WWII military forces saw semiautomatics introduced during the war, even if the standard gun was still bolt-action.