system
Given the following post, respond as if you're commenting on Reddit:
human
Eli5: why do chilli plants turn red to attract animals to disperse seeds but also produce the spicy chemical to put them off?
gpt
Birds cannot taste spicy flavors, so they can eat hot peppers with no impact.  Mammals and many other critters, on the other hand, don’t like the spice and will avoid them.  This helps to disperse the seeds further since birds travel further.  

This is also why adding spice to your bird feeder can help keep squirrels away!