@moteutsch from your profile, you seem to have a programming background, so allow me to answer a different, but closely related question first: why is the free monoid worth studying?
(In case you're not familiar, a monoid is like a group that doesn't necessarily have inverses)
The free monoid on a set is just the finite words if we take this set as an alphabet, or to put it differently all finite strings (including the empty string) where the letters are from our chosen set. For example, if you take a two element set {a,b}, then elements in the free monoid over that set look like "aba", "",…