TITLE: Why does a group homomorphism preserve more structure than a monoid homomorphism while satisfying fewer equations
QUESTION [13 upvotes]: Is there a deeper (categorical) reason for this?
On the one hand a group homomorphism $\phi:(G,\cdot)\to (H,\star)$ preserves 'results of operations' as well as the identity element and inverse elements, but satisfies only one equation: $$\forall g_1,g_2\in G:\phi(g_2\cdot g_1)=\phi(g_2)\star\phi(g_1)$$
while if $\phi$ was a monoid homomorphism instead, it would only preserve the first two things, but need to satisfy the additional equation $$\phi(e_G)=e_H$$
I know how to prove algebraically that a group homomorphism preserves all the mentioned structure, that's not the question. I do not understand why it preserves more structure than the monoid homomorphism, while at the same time having less 'algebraic conditions'.
EDIT: I think what really gives me trouble is that going 'in the natural order' from semigroups to monoids to groups, one starts with one equation for semigroup-homomorphisms, then adds an additional equation for monoid-homomorphisms, and then for group-homomorphisms one goes back to one equation. This seems strange to me.

REPLY [2 votes]: Definition: Given $s \in S$, where $(S, \cdot)$ a semigroup,

$s$ is idempotent $\iff$ $s \cdot s = s$

Here's how I think about it:

Semigroup homomorphisms preserve idempotence: Given a semigroup homomorphism $f: S \to T$, if $s \in S$ is idempotent, then $f(s) = f(s \cdot s) = f(s) \cdot f(s)$, i.e. $f(s)$ is idempotent in $T$.

In a group, the only idempotent element is the identity element.


Combining the two facts, we get for free that semigroup homomorphisms always preserve the identity when applied to groups, but not necessarily when applied to monoids.
Monoids can have idempotent elements which are not the identity, groups can't, semigroup homomorphisms preserve idempotence, so they are only guaranteed to preserve the identity for groups.
I claim this answers your question because idempotence is a categorical concept.
Note: Given a semigroup homomorphism $f: M \to S$, when $M$ is a monoid with identity $e_M$, we always have that $f(e_M)$ is an idempotent element in $S$ but that's it. (In particular, if $S$ is also a monoid, then we have a monoid homomorphism if and only if this idempotent element $f(e_M)$ is the identity of $S$.)
This can also be thought of as a (perhaps unnecessary) elaboration of one of the other answers.