Collections of cells working together as a unified body, producing specialized behaviors that lend adaptive advantage on a group scale which include some sacrificial acts that benefit that larger community is not unique to complex multicellular organisms like ourselves. It is more of a relationship theme that that has been threaded into biology long before multicellularity as we know it emerged. It involves perceiving necessities, and communicating these necessities across a biological domain so that effective behavioral responses can take place. This community principle, complete with communication across a wide biological landscape has been present, and conserved throughout our biological history – a unified purpose among different biological entities that arose out of necessity long before multicellular (metazoic) creatures emerged. Here is an example of how this takes place among microbes:
How Microbes Communicate Over Long Distances
“…Percolation is familiar to anyone who brews coffee, and it helped researchers at the University of California San Diego understand how bacteria communicate with one another over long distances. Communities of bacteria, sometimes called biofilms, aren’t just a clump of bacterial cells. It seems they can send signals to one another with ion channels, promoting the survival of the community and protecting it from attacks. New findings on that communication have been reported in Cell Systems.”
Link to full article:
https://www.labroots.com/trending/microbiology/12216/microbes-communicate-distance