I’m re-reading Bartosz Milewski’s Category Theory for Programmers and I am a bit confused. As I understand it, the universal construction (apparently called universal property elsewhere) is unique up to unique isomorphism, and the product is a universal construction over two projection morphisms. But isn’t the product not necessarily unique up to unique isomorphism?
For instance, in $\mathbf{Set}$, let us denote the cartesian product as $A \times B$, and invent a new “prime product” $A \times' B = \{a' : a \in A\} \times \{b' : b \in B\}$.
Then, consider a product such as $X = \{1, 2\} \times \{1, 2\}$ and its prime counterpart $X' = \{1, 2\} \times' \{1, 2\}$. These are both products of $\{1, 2\}$ with itself (note that this means that the projections are the same, saving some effort): There is $p : X \to \{1, 2\}, ~ p((a, b)) = a$ and $p' : X' \to \{1, 2\}, ~ p'((a', b')) = a$, and analogous $q, q'$, and there are morphisms $m : X' \to X$ and $m' : X \to X'$ such that $p' = p \circ m$, namely for $m((a', b')) = (a, b)$, and $p = p' \circ m'$, namely for $m'(a, b) = (a', b')$.
Note that $mm' = \mathbf{id}_{X'}$ and vice-versa, so it is an isomorphism. However, we can construct an alternate isomorphism via an automorphism over $\{1, 2\}$, e.g. $f(n) = 3 - n$ (the fact that $f^{-1} = f$ is irrelevant). Then, we could have $m_\mathrm{alt}((a', b')) = (f(a), b)$, and $m_\mathrm{alt}'((a, b)) = (f^{-1}(a), b)$, and still, $m_\mathrm{alt}m_\mathrm{alt}' = \mathbf{id}_{X'}$ and vice-versa.
We have therefore constructed two isomorphisms between the products. So it seems that products are not unique up to unique isomorphism.
Have I misunderstood something about the definition of products or the universal construction/property? Are there additional requirements for the isomorphisms? For instance, it seems to me that $m_\mathrm{alt}$ is no longer a factorizing morphism unless we redefine the projections for $X$. Is this an additional requirement that will ensure uniqueness?
The isomorphism is only unique when it is required to be compatible with the projections, for sure. Otherwise consider any set X with more than one element. It is the product of the family with just one set, X. Any set isomorphic to X is also a product, and of course there are many isomorphisms, even between X and X.
A better perspective is that a product of a family of objects in a category is not just an object. It is an object equipped with a family of projections. Morphisms between these are required to be compatible with the projections. The category of products defined this way has indeed the property that every two objects are uniquely isomorphic. When you want to talk about the underlying object of a product, you can say so or just use the usual notation $\prod_i X_i$.