Let $X$ be a set and $M$ the free monoid over $X$. Then an automorphism $f$ of $M$ satisfies $f(X)=X$ and so $\text{Aut}(M)$ is canonically isomorphic to $\mathfrak{S}_X$.
My Proof: For every word $w\in M$, let $l(w)$ be the length of $w$. We can show by induction on $l(w)$ that $l(f(w))\geq l(w)$. Since the same is true for $f^{-1}$, we have $l(f(w))=l(w)$ and the special case $l(w)=1$ is all we need to finish the proof.
I have almost no formal knowledge of category theory, but I try to think categorically whenever possible. Since the proposition above can be formulated in categorical language, I assumed there would be an easy proof using only the universal property of $M$. But then I realized that the analogous statement for groups is not true. For example, $\mathbf{Z}$, the free group over a one element set, has two automorphisms.
The reason the above proof breaks down is that there we had a (monoid) homomorphism $l:M\rightarrow\mathbf{N}$ with $l(X)=\{1\}$, and such a mapping does not exist if $M$ is the free group over $X$.
Questions:
Is there a name for (a theory about) the property of categories that the automorphism groups of free objects coincide with the permutation groups of the underlying sets?
Is there a "deeper" reason that the category of monoids has this property and the category of groups does not?