Batesian Mimicry
If you had ever been stung by a wasp, you would probably steer clear of any insect with bright yellow and black stripes. And if you were a bird, and a certain orange butterfly once gave you a terrible bellyache, you would probably avoid every butterfly that looked like it. It's just common sense, and many animals have evolved to take advantage of it.
Some harmless species have evolved to look like dangerous or bad-tasting ones, so predators leave them alone too. This is called Batesian mimicry, after the English naturalist Henry Walter Bates, who described it in 1862 after studying butterflies in the Amazon rainforest. Bates noticed that some perfectly edible butterflies looked almost identical to foul-tasting species that birds avoided.
Examples are everywhere. Many hoverflies are colored like wasps and bees but have no sting at all. The harmless scarlet kingsnake of North America has red, black and yellow bands much like the venomous coral snake. Some clearwing moths look and even buzz like hornets. For the mimic, looking dangerous is cheaper than actually being dangerous.
For many years, the textbook example was the Viceroy butterfly, which closely resembles the Monarch. Monarch caterpillars feed on milkweed and store its toxins, which makes adult Monarchs taste terrible to birds. The Viceroy was thought to be a tasty impostor. But in 1991, experiments showed that Viceroys taste bad to birds too; their caterpillars feed on willow leaves, which contain bitter salicylic acid, the natural relative of aspirin. So the Viceroy and the Monarch are actually an example of a different kind of mimicry, called Müllerian mimicry, in which two or more harmful species share the same warning colors and teach predators one lesson instead of two. It's named after the German naturalist Fritz Müller, who described it in 1878. Sometimes it pays to look dangerous, and sometimes it pays to look like your dangerous neighbor.