Its like a diesel engine.....compression causes heat/detonation.
Once upon a time when I was a yut, we would go to a farm in western MA and all would party.
The place had to be winterized, no running water and we got heat from a giant fireplace.
Being fun loving I would take a 30-06 in my hand while cupping a small Chinese lady finger firecracker and pretend to throw the round into the fire but only let the little lady finger go.
The fire cracker would make a small bang.
Well one of the chicks decided to throw a 30-06 in the fire.
We were sitting there playing cards and a much louder bang occurred throwing sparks all over the hearth followed by the sound of something hitting the ceiling and the "tinkle" of brass skidding across the floor.
No real damage. The brass made a slight impression in the ceilingand the bullet probably just stayed in place in the fire.
You just cant have any fun around some people.