It is not known exactly why Mimosa Pudica evolved this trait, but many scientists think that the plant uses its ability to shrink as a defense from herbivores. Animals may be afraid of a fast moving plant and would rather eat a less active one. Another possible explanation is that the sudden movement dislodges harmful insects. Once the leaves shrink , only the thorns are exposed.
They close up when it rains, too. In a way, this GIF kind of ended too soon, because, often, when one set closes, it causes a chain reaction and all the adjacent leaves fold up too. And then the other branches will do the same. A moment later, the whole plant has closed up.
Kids love these.
Plus, their mini pom-pom flowers are pretty.
The photo below is one of the flowers in our yard. Not planted, grew wild.