How it holds itself in place

The alarm going off is not the problem. What happens in the four seconds after it goes off is the problem. Follow the loop round once.

TriggerThis is dangerousThe body alarm firesEscape, check, oravoidRelief, withinminutes
The relief is what teaches the alarm it was right, so next time it fires faster. The diagram shows a loop running through: Trigger, then This is dangerous, then The body alarm fires, then Escape, check, or avoid, then Relief, within minutes.