It’s just another case of biologically different strokes. Differences among animal species can be enormous. There’s no reason to expect pests to behave like humans just because humans sometimes behave like pests.
The “heat” of cayenne and other hot peppers comes from chemicals called capsaicinoids. In humans and other mammals they irritate the mucous membranes of the mouth (and other mucous membranes at a later time, but we won’t go there).
The “heat” sensation comes primarily from the stimulation of our trigeminal nerves, which also react to pain and heat. Although I’ m not an entomological neurologist (is anybody?), I’d be willing to bet my jalepeƱo that insects don’t have trigeminal nerves. On the other hand, their antennae react to stimuli that we humans can’t even imagine, so let’s not feel too superior in the sensory department.
There are quite a few species of insect that infest spices and other dried foods. By all means, immediately discard any spices that appear to be infested before the little devils spread throughout the kitchen, or the whole house. I once found some so-called cigarette beetles (Lasioderna serricorne) breeding in a package of imported crackers.
It was a nightmare getting rid of them because they have wings, fly all over the house, and will eat almost anything, including, yes, tobacco. They’re yellowish-brown, about three millimeters long, and look almost exactly like, believe it or not, Volkswagen beetles.
Many of our spices these days are irradiated before being shipped to kill insects and their eggs. But as a precaution I put all imported spices that I’ve bought into the freezer for three or four days. Freezing will kill cigarette beetle eggs but may have no effect on other species, so don’t count on it.
The cigarette beetle, Lasioderna serricorne, is a common pantry pest. It feeds on dried tobacco, book bindings, and plant leaves. The larval stages can feed on cereal products, fresh ginger, raisins, dates, black pepper, dried fish, and seeds.