According to the Wikipedia article Disjoint union:
In mathematics, a disjoint union (or discriminated union) of a family $(A_{i}:i\in I)$ of sets is a set $A,$ often denoted by $\bigsqcup_{i\in I}A_{i},$ with an injective function of each $A_{i}$ into $A,$ such that the images of these injections form a partition of $A$ (that is, each element of $A$ belongs to exactly one of these images). The disjoint union of a family of pairwise disjoint sets is their union. In terms of category theory, the disjoint union is the coproduct of the category of sets. The disjoint union is thus defined up to a bijection.
This definition suggests, but does not state clearly, that not
only is every disjoint union a coproduct in $\mathsf{Set},$ but
conversely, every coproduct in $\mathsf{Set}$ is a disjoint union.
The comment on your question by @D_S, if I'm reading it correctly,
makes the same point.
I addressed this point in a long answer last year. It's very long, and mostly irrelevant to the present question, but the relevant portion is short enough to quote:
Every set-indexed family of sets $(A_k)_{k \in K}$ has a coproduct.
The usual construction, which confusingly is called a disjoint
union of the
$A_k$ (even though the point is that the $A_k$ need not be
disjoint), is $E = \bigcup_{k \in K} A^*_k,$ where
$A^*_k = \{k\} \times A_k$ for all $k \in K$ (or
$A^*_k = A_k \times \{k\},$ it makes no difference).
As the Wikipedia article rightly observes, the crucial property of
such a set $E$ is that there is a family of injective functions
$(\epsilon_k \colon A_k \to E)_{k \in K}$ whose images $A^*_k$ form
a partition of $E$. It is clear that any such set $E$, with such
functions $\epsilon_k,$ has the universal property needed for it to
be a coproduct of the $A_k.$
The converse is also true. Let $(C, (\gamma_k)_{k \in K})$ be any
coproduct of the $A_k,$ and let $\varphi \colon C \to E$ be the
unique bijection such that $\varphi \circ \gamma_k = \epsilon_k$ for
all $k \in K.$ Then each of the functions
$\gamma_k = \varphi^{-1} \circ \epsilon_k$ is an injection, and
their images $\gamma_k(A_k) = \varphi^{-1}(A^*_k)$ form a partition
of $C,$ so $(C, (\gamma_k)_{k \in K})$ is a disjoint union of the
$A_k,$ in the sense defined by the Wikipedia article.
The definition of 'disjoint union' given in your question isn't clear to me.
(I don't know much about category theory, so it's possible that I have
misunderstood something.)
It seems to merge part of the Wikipedia definition (not all of it, as it omits
the part about injective functions) with a version of the usual definition of a
coproduct in $\mathsf{Set},$ complicated by the requirement that $(Z,g_X,g_Y)$
itself be a disjoint union, so that the definition seems to recurse on itself, in
a never-ending way. (I hope I'm not just projecting my own confusion onto what
you've written!)
Do you have a source for this definition? I'm sorry to answer a question with
another question! You write:
However, for disjoint unions, there seems to be additional restrictions [$\ldots$]
What have you read that gives this impression?
Incidentally, it would be good to have an authoritative source for a definition of
the term 'disjoint union'. (Wikipedia is often excellent on mathematics, and I
find little wrong with its definition of the term, but it is not an authoritative
reference.)
I would also like to take up your comment about there being an analogous
question for products. I believe that there is such a question, and I would
phrase it thus (this is just off the top of my head, as I can't easily lay my
hands on the many notes I've written on the topic - they are all over the
place, in more senses than one!):
Say, temporarily (I don't have a term for this), that a set $Z$ is an
'independent combination' of sets $X$ and $Y$ if there are functions
$\eta_X \colon Z \to X$ and $\eta_Y \colon Z \to Y$ such that:
(i) for all $z, z' \in Z$ we have $z = z'$ if and (trivially) only if
$\eta_X(z) = \eta_X(z')$ and $\eta_Y(z) = \eta_Y(z')$; and
(ii) for all $x \in X$ and all $y \in Y,$ there exists $z \in Z$
such that $\eta_X(z) = x$ and $\eta_Y(z) = y.$
This is analogous, at least loosely, to the definition (as in Wikipedia) of a
'disjoint union', because $\eta_X$ and $\eta_Y$ determine equivalence relations
on $Z$ (analogous to subsets of a 'disjoint union'), condition (i) says that
their conjunction is the identity relation on $Z$ (analogous to the union of
two subsets being the whole set), and condition (ii) says that the two relations
are in a sense 'independent' of one another (analogous to two subsets being
disjoint), and $X$ and $Y$ are in one-to-one correspondence with the quotients
of $Z$ by the two relations (analogous to $X$ and $Y$ being in one-to-one
correspondence with subsets).
Clearly, any independent combination of $X$ and $Y$ is also a product of $X$ and
$Y$ in the categorical sense, because conditions (i) and (ii) together assert -
without explicit mention of ordered pairs - that there is a bijection
$\eta \colon Z \to X \times Y,$ defined by $\eta(z) = (\eta_X(z), \eta_Y(z)),$
and we have $\eta_X = \pi_X \circ \eta$ and $\eta_Y = \pi_Y \circ \eta,$ where
$\pi_X \colon X \times Y \to X$ and $\pi_Y \colon X \times Y \to Y$ are the
projections.
Conversely, any product, $Z,$ of $X$ and $Y$ in $\mathsf{Set},$
with its projections $\eta_X \colon Z \to X$ and $\eta_Y \colon Z \to Y,$
is an independent combination of $X$ and $Y,$ because there is a bijection
$\theta \colon Z \to X \times Y$ such that $\eta_X = \pi_X \circ \theta$
and $\eta_Y = \pi_Y \circ \theta,$ and conditions (i) and (ii) are clearly
satisfied.
(However, I'm pretty sure that the last time I wrote notes on this topic, I came
to the disappointing conclusion that the analogy doesn't go as far, or work as
nicely, as I'd hoped. I wish I could be less vague about this, but your comment
was interesting, and it would be a shame just to let it pass by.)