Submitted by HazeThere t3_yhz5vu in explainlikeimfive
Like how does fruit know to be sweet to persuade us to eat it and shit the seeds somewhere else? How do chilies know that only birds are immune to spice of capsaicin so that they will eat it and take the seeds further when they fly somewhere else? Did they plan this or was it an accident?
tdscanuck t1_iuggcpd wrote
They dont know. They didn't plan any of it. It's just an accident.
That basically how evolution works...plants & animals keep randomly trying things (DNA mutations)...some of them work to make the critter more successful, most don't work at all and the critter dies.
Every once in a while, a mutation is useful enough that the critter gets to reproduce more, creating more critters with that mutation. Eventually, the traits that don't work die out and the ones that do work well (enough) spread.