many years ago, while overnighting in a hunting cabin, a loose .308 Win round got mixed in the some paper trash, and went into the stove. A few minutes later, a loud bang, and few "ptinks" were heard.
next morning, cleaning out the stove (we cleaned our shorts the night before
) the .308 case & bullet were found, the case had ruptured (blown out) and several small chunks of brass had "grenaded" the inside of the stove.
While brass fragments (or the primer) can cause injury,you have to be very close to the case when it explodes. Standing right next to the fire in street clothes is not recommended.
From a practical perspective, a firefighter in full bunker gear stands very, very little chance of injury from ammo cooking off in a fire.
However, the presence of ammo cooking off also implies there are other things in there that either are, or could burn/detonate (solvents, powder, aerosols,etc..) so since things are replaceable and lives are not, policy is to let hazardous materiels burn, if no lives are at risk to do so.
Fireman also do not enter burning areas where fuels or paints are stored, if no lives are at risk. Cellar Savers/Silo Savers (volunteers) and full time professionals ARE heroes, not because they will allow unoccupied buildings to burn down from time to time, but because they WILL and DO go into burning buildings to rescue people.