In 1995 my gun shop burned to the ground. It contained among other things about 30,000 rounds of ammo, cans of smokeless and black powder and many thousand primers. Plus seven (unloaded) guns.
When not confined by a barrel and chamber, the bullet will remain stationary and the case and/or primer will fly more or less distance depending on conditions and size.
This is the common opinion because of limited testing but I can tell you that bullets will fly with enough force to go through steel ammo boxes, walls, etc.
See for yourself.
Gun powder cans. The smokeless cans do not blow up. Black powder and WD40 cans do blow up.
Note the bullet holes in the two bottom center cans. Those bullets had to go through AT LEAST a steel military ammo can before going through those powder cans.
This can was full of plastic boxed 9mm and over ten feet from the fire but the heat still caused about 30 rounds to explode with a lot of force. Funny thing was the rounds that exploded were on the unburned side of the can. From the bulged and busted unburned bottom of the can you can see those few 9mm rounds created a lot of pressure. Why more, especially on the burned side, didn't explode I have no idea. Later I shot all those rounds and had just a couple duds.
The Ruger Mark I is one of the guns I lost.
Most of the ammo was in 30 and 50 cal steel GI ammo cans.
Strange things happened.
One can was over half full of Chi Com 7.62x39. Even though the can was severely beat up it didn't have one hole.
All of the other cans had holes and tears and severe dents showing that some bullets and cases were hitting the walls of the cans with great force.
(the cans are so rusty because they were out in the weather for some time before I thought to get these pictures)
I also found bullet holes in the metal walls of the shop. These bullets had to first penetrate the steel ammo boxes and who knows what else before going through the wall.
Most of the exploding ammo was contained by the steel ammo cans but a number of bullets and cases did travel with enough force to cause serious injury.
It was an interesting day.