Vultures, who survive on the rotting remains of carcasses, spew chunks of vomit when threatened. (Mark Ralston/Agence France-Presse/Getty Images)

Deodorant, perfume, soapy showers. Most humans make a big effort to smell good. But out in the wild, it can pay to reek.

You probably already know that skunks occasionally spray unfortunate humans (and their pets) with a foul-smelling liquid. The chemical compounds that shoot out of their behinds are so funky they can cause nausea and a burning sensation in the eyes — and that’s the point! A skunk only sprays when it feels threatened.

Bombardier beetles’ stinky spray can reach boiling temperatures. (iStock)

This superpowered stink is the result of natural selection, which is how animals evolve, or change, over time. A creature that can defend itself against predators is more likely to survive and have babies. That means traits that keep a critter from turning into dinner are more likely to be passed on from generation to generation. Some species relied on strength and speed, becoming stronger and faster over the course of many, many years. Others got really good at hiding by developing camouflage that matches their natural habitat. And while it might not sound glamorous, some animals evolved to smell bad.

Skunks are the most famous stink-sprayers, but they’re not alone. Some millipedes — creepy crawlers with hundreds of little legs — shoot a nasty liquid out of their bodies when disturbed. Bombardier beetles do too, and their stinky spew can reach boiling temperatures. As if the smell wasn’t bad enough!

There are simpler ways to scare off a predator with foul smells, too. Vultures, which survive on the rotting remains of picked-over carcasses, will spew chunks of vomit when threatened. This makes them lighter, so they can fly away more effectively, but the odor of the partly digested food — which was pretty stinky even before the bird ate it — is usually enough to make anyone back off. Opossums, famous for playing dead until potential predators lose interest (unlike vultures, most carnivores want fresh meat), emit a nasty mucus to make their act more convincing.

Hyenas produce a stinky “butter” (and smear it all over the place) as a form of communication with one another. (John Thys/Agence France-Presse/Getty Images)

But not every stench you sense is designed to keep bad things at bay. Some eye-watering odors are meant to attract attention, not repel it. Hyenas produce a stinky “butter” (and smear it all over the place) to communicate with their own kind. Male musk oxen produce their famous musk (which, in case you couldn’t guess, is very stinky) to mark territory during mating season. And over in the plant kingdom, the infamous corpse flower blooms with a mighty stench to mimic rotting meat — a beacon of hope to nearby beetles in search of dinner. Those bugs do the work of pollinating the corpse flower, so its pungent perfume is crucial to the survival of its species.