Hormones are released during any stimulating or emotionally charged events. When nerves "rewire" to basically form new memory circuits, the neurons at the site increase their chemical sensitivity due to the release of hormones. The brain is wired to work this way; importat things are usually associated with the release of hormones. When there is a threat around you, your brain releases adrenaline, and therefore characterizes that moment as important, as in case it would happen again, you would remember it thanks to the increased strength of memory due to hormonal release.