Lots of plants have a set of cleverly contrived natural defences, carefully honed by millenia of evolution to be repulsive to animals which might want to try and eat them. Unfortunately for those plants, human beings are funny creatures who often find those natural defences to be delicious.
Allyl isothiocyanate here is just such a molecule. Specifically, it’s the molecule which makes mustard, horseradish and wasabi spicy!
Plants often use sulfur compounds in their defences, such as allicin in onions. In this particular case though, allyl isothiocyanate is actually harmful to the plant too. In the actual plant tissues, it’s stored as a harmless glucosinolate (often a particular one called sinigrin). There it sits, inactive… until something takes a bite. Then an enzyme rapidly starts to react with the sinigrin, producing allyl isothiocyanate (in a process not entirely dissimilar to the way bananas turn brown when cut). This stuff is lethal to insects and actually quite toxic to most mammals, humans included. In the small amounts you might add to a hot dog, however, it’s essentially harmless, doing little more than giving you a sharp burst of spiciness as you eat!
Interestingly, sinigrin is also found in brussel sprouts and broccoli, which might partially explain why both of those vegetables sometimes have a rather bitter aftertaste to them.
(via @dailymolecule – evidently they like spicy things as much as I do!)