Wild chilies make their seeds and fruits to propagate themselves. But chili seeds eaten by mammals tend to be chewed up, and even if they are not, they don't germinate successfully after passing through our digestive systems, and even if they did, mammals don't tend to transport seeds as far as birds would. So it is well worth their while to produce a compound that dissuades mammalian seed predators and simultaneously encourages avian seed dispersers. Chili seeds pass though the guts of most seed eating birds perfectly primed to germinate, and get a ride far from their parent plant.
But in my bird feeder, the seeds are an enticement to the birds I want to attract, and a strong discouragement to the squirrels. And because it is whole seed, it won't wash away as chili powder would, and pouring whole seed it does not induce as much coughing.
I bought a very cheep bag of over-ripe Thai chilies from my local grocery store, dried them in the sun and then banged them around in the food processor until all the seeds had come loose and settled to the bottom. I then mixed them with commercial bird seed before filling the feeder. The squirrel, to my knowledge, visited the feeder only once.