Children make all kinds of mumbling noises when they begin to exercise their burgeoning verbal skills. One of the first sounds they make is the one that indicates that they would like to be fed. The Greek mamme is an observed form of baby-talk similar to the Sanskrit ma which came over time to take on the meaning of mother in many human languages.
The gland that secretes milk is called the mammary because this is what the baby is hoping to score when it makes that sound. In vocalizing a need or hunger the babies of the ancients like babies today blurted out a sound that came somewhat naturally to them. Perhaps this is analogous to how the baby bird knows how to chirp in a certain way when it's hungry.
Human languages are open source, they ebb and flow and evolve in a complex swirl of positive and negative feedback loops played out in myriad ways. Several languages have a word that sounds like meh-meh that could mean breasts or baby food depending on the context and there are variations on that word that morph into words like num-num which may be a novel transformation of mama.
Some think that all of our languages are variations and extensions of only a handful of naturally occurring exclamations that over time evolved into the thousands of languages that have been spoken throughout history. One linguist thought that all of language derived from only four syllables: sal, ber, yon, and rosh. The variables and assumptions required are far too numerous and complex for us to confidently make such assertions but there is some intuitive truth to the notion that the animal chirps of our ancestors with the power of some very extensive collaboration allowed us to develop our human languages which are so wonderfully rich that they have the power to address themselves.