If a product of sets can also identify elements with a common preimage then why isn't it the pushout? Starting with the functions $f:Z \rightarrow X$ and $g:Z \rightarrow Y$ there is a pushout of that diagram that identifies elements of $X$ and $Y$ which have a common preimage.
Hypothetically speaking if $Z$ is a singleton, if $f,g$ are injective surjective functions and if the pushout were $X \times Y$ then the product would identify two elements with the same preimage of $f,g$. Based on this information, why isn't the product & it's associated functions the pushout?
 A: In the case where $X$ and $Y$ are both finite sets, i.e. if $X\times Y$ is finite, then this is usually impossible for size reasons: size of the product $X\times Y$ is the product of the sizes of $X$ and $Y$ (the number of ordered pairs), while the size of the pushout of $Z\to X$ and $Z\to Y$ is at most the sum of the sizes of $X$ and $Y$ (for $Z\to X$ and $Z\to Y$ both injective, it's minus the size of $Z$). For details on these estimates, see the end of the answer.
In particular for finite sets and $Z\to X$ and $Z\to Y$ injective this is only possible if all sets are empty, if $Z$ and one of $X$ or $Y$ is a singleton, or if $Z$ is empty, and both $X$ and $Y$ have size $2$. Indeed, if $x,y,z$ stand for the sizes of $X$, $Y$, and $Z$, then we would need $xy=x+y-z$. If $x$ is zero, then $z$ would have to be zero, and then $y$ would have to be zero. If $x$ is $1$, then $x$ and $z$ are equal. If $x$ and $y$ are both $2$, then $z$ is zero. Otherwise, if one of $x$ or $y$ is more than $2$, then $xy>x+y\geq x+y-z$.

The question at hand is a special case of when $Z$ and $X$ singletons. In that case, we have that the projection map $X\times Y\to Y$ is an isomorphism. Indeed, we have $\{*\}\times Y=\{(*,y):y\in Y\}$, for which the projection $\{*\}\times Y\to Y$ is evidently a bijection.
More abstractly,  singletons are terminal objects in the sense that for any set $W$ there is a unique function to any given singleton. Consequently, pairs of morphisms, one of which is to a terminal object, are the same information as a single morphism, so $Y$ equipped with the identity morphism $Y\to Y$ and the unique morphism $Y\to X$ is also product, and hence canonically isomorphic to $X\times Y$.
Now, the pushout of $f\colon Z\to X$ and $g\colon Z\to Y$ when $f$ is an isomorphism is quite simply $Y$ itself, with inclusion functions given by $g\circ f^{-1}\colon X\cong Z\to Y$ and $\mathrm{id}_Y\colon Y\to Y$. Set-theoretically, every element of $x$ is equivalent to a unique element of $y$, so every element of $Y$ is a representative of a unique equivalence class constiuting the pushout $X\sqcup_ZY$.
Thus, if $Z$ and $X$ are both terminal objects in a category, then we have canonical isomorphisms $X\times Y\cong Y\cong X\sqcup_ZY$ for any $Z\to Y$.

The remaining possibilities for identifying a pushout with a product in finite sets are for the cases where $Z$ is the empty set, i.e. initial object, so the identification of coproducts with products. These are slightly more involved from a categorical point of view.
The case where $X$ is empty, i.e. an initial object, the inclusion $Y\cong X\sqcup Y$ is an isomorphism (for reasons dual to the argument that the projection of a product with a terminal object is an isomorphism). Set-theoretically, the disjoint union of a set with the empty set is in bijection with the original set.
In the case of sets $X$ is also a strict initial object, meaning that any morphism to it is an isomorphism (the only functions to the empty set is the empty function). Thus $X\times Y$ having a projection to the strict initial object $X$ is an isomorphism, so $X\times Y$ is also an initial object. Set-theoretically, $\{(x,y):x\in X,y\in Y\}$ is empty when $X$ is empty.

Finally, for finite sets, we have the case where $X$ and $Y$ both have size $2$. This is actually the most interesting case. What's happening is that a set of size $2$ is the coproduct of singletons. Categorically, $\mathbf 2=\mathbf 1\sqcup\mathbf 1$ is the coproduct of terminal objects.
Now in general, $(A\times B)\sqcup(A\times C)$ has a unique morphism to $A\times(B\sqcup C)$ arising from the two morphisms $A\times B\to A\times(B\sqcup C)$ and $A\times C\to A\times(B\sqcup C)$. In particular, we have $\mathbf 2\sqcup\mathbf 2\cong(\mathbf 2\times\mathbf 1)\sqcup(\mathbf 2\times\mathbf 1)\to\mathbf 2\times(\mathbf 1\sqcup\mathbf 1)\cong\mathbf 2\times\mathbf 2$.
In the case of sets, this natural map is a bijection (more generally, categories are distributive if always $(A\times B)\sqcup(A\times C)\cong A\times(B\sqcup C)$). Explicitly, if $\mathbf 2=\{0,1\}$, then $\{0,1\}\sqcup\{0,1\}\cong\{(0,0),(1,0)\}\sqcup\{(0,1),(1,1)\}=\{(0,0),(1,0),(0,1),(1,1)\}\cong\{0,1\}\times\{0,1\}$. What is interesting here is that the one projection of the product selects the element of one of the original $\mathbf 2$'s, while the second projection selects which of the two $\mathbf 2$'s that element was in. The reason this is intersting, is that it can be categorically abstracted to the notion of a boolean object: $\mathbf 2$ is a coproduct of two terminal objects so that the above morphism is an isomorphism. Such objects play a key role in the category-theoretic instantiaton of the notion of boolean algberas.

To finish the story for sets, if $X\times Y$ is an infinite set, then it has the same cardinality as $X\sqcup_ZY$, so the two always have a bijection between them, hence $X\times Y$ can always be equipped with the structure of a pushout. However, this structure will not be compatible with the product structure in any meaningful way. As an example, we have a bijection of the set of pairs of natural numbers with the set of natural numbers, and a bijection of the set of natural numbers with the disjoint union with itself via bijections to the sets of even and odd natural numbers.

Let $X\times Y$ stand for the product. More precisely, this means we have morphisms $\pi_1\colon X\times Y\to X$ and $\pi_2\colon X\times Y\to Y$ such that for every pair of morphisms $h_1\colon W\to X$ and $h_2\colon W\to Y$, there is a unique morphism $h\colon W\to X\times Y$ (sometimes written using order pair notation $h=(h_1,h_2)\colon W\to X\times Y$) such that $\pi_1\circ h=h_1$ and $\pi_2\circ h=h_2$.
In set theory, the product is usually the set $X\times Y=\{(x,y):x\in X,y\in Y\}$ of ordered pairs of elements of $X$ and $Y$ (for some notion of ordered pair, e.g. Kuratowski's $(x,y)=\{x,\{x,y\}\}$), and the projection functions are the set-theoretic functions $\pi_1\colon (x,y)\mapsto x$ and $\pi_2\colon(x,y)\mapsto y$. Let me leave it as an exercise to check that these satisfy the defining universal property defined above. Note that for finite sets, the size of the product is the umber of ordered pairs, so the product of the sizes.

Let $X\sqcup_ZY$ stand fo the pushout of $f\colon Z\to X$ and $g\colon Z\to Y$. This means more precisely that we have morphism $i_1\colon X\to X\sqcup_ZY$ and $i_2\colon Y\to X\sqcup_ZY$ such that for any pair of morphisms $h_1\colon X\to W$ and $h_2\colon Y\to W$ that satisfy $h_1\circ f=h_2\circ g$, there exists a unique morphism $h\colon X\sqcup_Z Y\to W$ such that $h\circ i_1=h_1$ and $h\circ i_2=h_2$.
In set theory, the pushout is usually presented in two stages.
First, when $Z$ is the empty set, there is for every other set $W$ a unique empty function $Z\to W$ (i.e. $Z$ is an initial object). In particular, $f\colon Z\to X$ and $g\colon Z\to Y$ are both the empty function, and moreover any pair of morphisms $h_1\colon X\to W$ and $h_2\colon Y\to W$ satisfy $h_1\circ f=h_2\circ g$.
Consequently, the universal property defining $X\sqcup_ZY$ reduces to the one defining the coproduct $X\sqcup Y$ when $Z$ is an initial object. Namely, there is a pair of morphisms $i_1\colon X\to X\sqcup Y$ and $i_2\colon Y\to X\sqcup Y$ such that for any pair of morphisms $h_1\colon X\to W$ and $h_2\colon Y\to W$, there exists a unique morphism $h\colon X\sqcup_Z Y\to W$ such that $h\circ i_1=h_1$ and $h\circ i_2=h_2$.
In set theory, the coproduct $X\sqcup Y$ is the disjoint union of the two sets. One explicit construction is $X\sqcup Y=\{(0,x):x\in X\}\cup\{(1,y):y\in Y\}$, with functions $i_1\colon x\mapsto(0,x)$ and $i_2\colon y\mapsto(1,y)$.
The second stage is the realization that the inclusion morphism $X\to X\sqcup_ZY$ and $Y\to X\sqcup_ZY$ imply there is a unique morphism $e\colon X\sqcup Y\to X\sqcup_ZY$ from the coproduct such that $e\circ i_1\colon X\to X\sqcup_ZY$ and $e\circ i_2\colon Y\to X\sqcup_ZY$ are the inclusions of the pushout.
It turns out that $e\colon X\sqcup Y\to X\sqcup_ZY$ also satisfies a universal property. Namely, pairs of morphisms $h_1\colon X\to W$ and $h_2\colon Y\to W$ that satisfy $h_1\circ f=h_2\circ g$ correspond to morphisms $k\colon X\sqcup_Y\to W$ such that $k\circ i_1\circ f=k\circ i_2\circ g$ and $k\circ i_1=h_1$, $k\circ i_2=h_2$. Consequently, $e\colon X\sqcup Y\to X\sqcup_ZY$ has the universal property that for any $k\colon X\sqcup Y\to W$ such that $k\circ i_1\circ f=h\circ i_2\circ g$ there is a unique morphism $h\colon X\sqcup_YZ\to W$ such that $h\circ e=k$.
In other words, $e\colon X\sqcup Y\to X\sqcup_ZY$ is what is known as a coequalizer of $i_1\circ f\colon Z\to X\to X\sqcup Y$ and $i_2\circ g\colon Z\to Y\to X\sqcup Y$.
In the category of sets, coequalizers can be constructed as quotients of equivalence relations. Thus $X\sqcup_ZY$ consists of equivalence classes of elements of $X$ and $Y$ for the relation generated by $x\sim y$ if there exists $z\in f^{-1}(x)\cap g^{-1}(y)\subseteq Z$. In particular, the size of the pushout $X\sqcup_ZY$ is the number of equivalence classes on $X\sqcup Y$ generated by that relation, so at most the size of $X\sqcup Y$, i.e. at most the sum of the sizes of $Z$ and $Y$.
Moreover, if $f\colon Z\to X$ and $g\colon Z\to Y$ are injective, then the only non-singleton equivalence classes consist of pairs of elements $x$ and $y$ of the form $f(z)$ and $g(z)$. Thus in that case the size of $X\sqcup_Z Y$ is the sum of the sizes of $X$ and $Y$ minus the size of $Z$.
