Humans are social creatures, evolved to live in groups. Screaming at danger can provide two benefits: The first is the obvious potential for the rest of the group to come help you deal with the danger and so increase your chances of survival. Another less obvious benefit is that screaming when in danger can help *the rest of the group survive*!
Remember that evolution acts on the level of the gene, not the individual. A group of animals with a shared genetic heritage that has the trait to raise the alarm when one is harmed can benefit even if the alarmed animal doesn’t survive. By alerting the others to danger their chances of survival increase, passing along the trait to other creatures.
I can ELI2 if you want. Pain is bad, scream gets help, help stops pain.
ELI3-4: when you are in pain or get scared sometimes you’re in danger. Screaming or shouting can let other people around you know that you’re scared or in pain and so they will often come and help you. Other people, especially adults, will help you with your pain, get you out of danger or protect you from what you are scared of.
I’m not doing any more ages.
Latest Answers