Original: The millipedes have glands that produce hydrogen cyanide to protect them from predators, a fact advertised by their aposematic color. Because they produce cyanide, they smell like almonds.
Simplified: They have glands that release cyanide to protect them from predators.