We lose baits all the time. ~ American entomologist Grzegorz Buczkowski
Cockroaches first appeared during the Carboniferous, over 320 MYA. These were the ancestors to modern roaches and mantises. The cockroaches scurrying about today debuted during the early Cretaceous, 140 MYA.
In response to assault of toxic baits by people, who consider their home not a proper residence for roaches, German cockroaches rapidly adapted. The sugar glucose, put in baits to attract, instead took on a bitter taste, which the roaches avoided.
Instead of taste buds, cockroaches have taste hairs on many parts of their body. The taste mechanism is much the same: the vibrations of sensed molecules trigger signals deciphered for substance quality.
Glucose is a come-hither sweet to countless life forms, and a ubiquitous biological fuel. Given poisonous glucose, roaches learned that glucose out of context to a natural sugar is a trap. This adaptation took less than a decade from the time glucose baits were introduced. The exact evolutionary mechanism remains a mystery.
Mosquitos are another highly unpopular pest. They quickly evolved not to linger on walls that have been treated with insecticide. Instead, untreated ceilings are preferred.