I don't understand the accepted answer to this question:
Pushout on the following diagram
In particular, the pushout diagram

I understand that there is a theorem stating that, in general, the pushout in the category of groups is the amalgamated product.
However, for the specific case described where one of the groups $X,Y$ is the trivial group, (say, $X$ is the trivial group), then $j_1 \circ f$ can only take one value. Thus, $j_2 \circ g$ can only take one value as well. Thus, the pushout need only contain 1 element. And the trivial map is easily shown to be a homomorphism. So it seems that everything is satisfied. Where did my reasoning go wrong?
Let's fix a span $X \overset{f}{\leftarrow} Z \overset{g}{\rightarrow} Y$, and maps $j_1 : X \to Q$ and $j_2 : Y \to Q$. Then our span has a pushout $P = X \ast_Z Y$ and if $f \circ j_1 = g \circ j_2$ there's a unique map $j_1 \ast_Z j_2 : P \to Q$.
The issue with your logic is what it means for $j_1 \circ f = j_2 \circ g$. These have to be equal as maps from $Z \to Q$, and just because (in case $X = 1$, say) the map $j_1 \circ f = j_2 \circ g$ is the constant identity map, this gives us no control at all over what happens to the elements of $Y$ that aren't in $Z$!
For example, let's look at the span $1 \leftarrow 1 \rightarrow \mathbb{Z}$, shown below:
We need to know that, for every choice of $g$, there's a unique map $P \to Q$ making the square commute. But let's let $Q = \mathbb{Z}$, and $g$ the identity map. Then there needs to be a map $P \to \mathbb{Z}$ which factors the identity map. In particular, $P \neq 1$! (Do you see why?)
Again, notice the idea here is that we have no control over what happens in $\mathbb{Z}$. We only have control over the subgroup $1 \leq \mathbb{Z}$. So our pushout has to allow for the flexibility of any maps we used to have out of $\mathbb{Z}$, even though the $1$ half of the pushout is trivial.
In fact, can you prove that, for any groups $G$ and $H$, the pushout $G \ast_1 H$ is (canonically) isomorphic to the free product $G \ast H$? In particular, can you show that the pushout of the span $1 \leftarrow 1 \rightarrow G$ is always canonically isomorphic to $G$ (so is very rarely isomorphic to $1$).
As a last, less trivial example, say $N$ is a normal subgroup of $G$. Then consider the pushout of $1 \leftarrow N \rightarrow G$ shown below:
Then maps from $P \to Q$ have to be in bijection with maps $f : G \to Q$ so that $f \circ \iota = e_Q$. That is, maps $P \to Q$ are in bijection with maps $f : G \to Q$ killing $N$.
Can you show that the pushout $P = G \ast_N 1$ is (canonically) isomorphic to the quotient $G \big / N$, and $q$ agrees with the usual quotient map? Do you see how this fits into the framework we've been talking about so far, regarding control over what happens to $N$ but not over what happens to the rest of $G$? For a challenge, what happens when $N$ is not normal?
I hope this helps ^_^