Products in category theory versus products in set theory I do not understand the point being made in these informal comments on the notion of a product in category theory versus in set theory. If anyone can help explain them I will be delighted:

"The extension of the concept of product to the case of two arrows is particularly interesting because it provides a simple and nevertheless rather illuminating example of the fact that in certain circumstances the analysis of a concept provided by category theory is more satisfying than that furnished by set theory. As will be recalled, the product of $n$ sets was introduced as the successive iteration of the product of two sets, with the unpleasant complication that since the product of these sets is not associative, many assertions involving multiple products don't turn out correct and, therefore, the remarks made about the possibility nevertheless of adjusting the situation via isomorphisms aren't on the whole reassuring. In category theory the concept of a multiple product can be introduced by generalising naturally from the binary case and thereby it can be seen that every reassociation of the entity obtained applying $k-1$ times the binary product beginning with given $k$ objects is a $k$-ary product of these objects." 



*

*From Ettore Casari, La Matematica della Verita' (2006): page 347 [translation from Italian made by me].


Casari seems to be referring to an earlier discussion (p.87), where he writes:

"For every $j \in I$, the $j$-th projection of $\prod_{i \in A} A(i)$ is the function $\pi^{I}_j: \prod_{i \in A} A(i) \rightarrow A_j$ defined, for every $f \in \prod_{i \in A} A(i)$, by $\pi^{I}_j(f): = f(j)$.
It merits observation that, in contrast to what happens with the case of union or intersection, $\prod \{A_1, A_2 \}$ isn't really $A_1 \times A_2$; the former is a set of functions, the latter a set of ordered pairs, the latter concept which is for us logically anterior to the concept of a function, given that we used it to define the concept of a relation, identifying the functions with certain particular relations. Nevertheless, this difference doesn't turn out to be particularly relevant for our purposes and therefore, when convenient, we won't hesitate to write, for example $\prod_{i \in \{1,..., k \}} A_i$ as $A_1 \thinspace \times ... \times \thinspace A_k$ (ignoring the circumstance in which $\times$ is not associative) and taking the $i$-th projection $\pi^{k}_i$ as defined, for $x_1,..., x_i,...,x_k \in A_1 \thinspace \times ... \times \thinspace A_k$, by $\pi^{k}_i (x_1,..., x_i, ..., x_k) := x_i$. 

The first comment above is made just after proving the theorem given below (p.346):

THEOREM: $\textit{If} \hspace{0.2cm}a  \leftarrow m \rightarrow b 
\hspace{0.2cm}\textit{is a product of objects a, b in some category} \hspace{0.2cm} \mathcal{C} \hspace{0.2cm} \text{(} consisting \hspace{0.2cm} of \hspace{0.2cm} arrows \hspace{0.2cm} p_1: m \rightarrow a \hspace{0.2cm} and \hspace{0.2cm} p_2: m \rightarrow b \text{)} \hspace{0.2cm} and \hspace{0.2cm}a'  \leftarrow m' \rightarrow b' \hspace{0.2cm} \textit{is a product of objects a', b' in} \hspace{0.2cm} \mathcal{C} \hspace{0.2cm} \text{(} consisting \hspace{0.2cm} of \hspace{0.2cm} arrows \hspace{0.2cm} p^{'}_1: m \rightarrow a \hspace{0.2cm} and \hspace{0.2cm} p^{'}_2: m \rightarrow b \text{)}\hspace{0.2cm} (\text{see the diagram below)}, \textit{then for all arrows} \hspace{0.2cm} f, g, \textit{such that} \hspace{0.2cm} f: a \rightarrow a'\hspace{0.2cm}\textit{and}\hspace{0.2cm} g: b \rightarrow b' \textit{there is exactly one arrow} \hspace{0.2cm} h: m \rightarrow m' \hspace{0.2cm} \textit{such that} \hspace{0.2cm} f \circ p_1 = p^{'}_1 \circ h \hspace{0.2cm} \textit{and} \hspace{0.2cm} g \circ p_2 = p^{'}_2 \circ h, \textit{such as to render the following diagram commutative:} 
\hspace{0.2cm}$
$$
\newcommand{\ra}[1]{\!\!\!\!\!\!\!\!\!\!\!\!\xrightarrow{\quad#1\quad}\!\!\!\!\!\!\!\!}
\newcommand{\da}[1]{\left\downarrow{\scriptstyle#1}\vphantom{\displaystyle\int_0^1}\right.}
%
\begin{array}{llllllllllll}
a & \ra{p_1} & m & \ra{p_2} & b \\
\da{f} & & \da{h} & & \da{g}  \\
a' & \ra{p^{'}_1} & m' & \ra{p^{'}_2} & b'  \\
\end{array}
$$

 A: The product of sets is not associative indeed:
$$(\{1,2\}\times\{3\})\times \{4\} = \{(1,3),(2,3)\}\times\{4\} = \{((1,3),4), ((2,3),4)\}$$
$$\{1,2\}\times\{3\}(\times \{4\}) = \{1,2\}\times\{(3,4)\} = \{(1,(3,4)), (2,(3,4))\}$$
..fundamentally because "tuples" (however you choose to build them in your set theory construction) are not associative. Now, I can say there is a natural isomorphism between these two products, taken in different orders: I take the tuples in the 'left half' of each element of the first set, and regroup them to get the elements of the second set. I can show that this is always bijective. So, for any sets $A, B, C$, there is a natural isomorphism $\phi$ such that $\phi((A\times B)\times C) = A\times(B\times C)$
But that I need to explicitly talk about this isomorphism is, in some sense, worrying. How will this look when I take products of 4 things, with all their different groupings? What if I want to take an infinite product? And indeed there will be much more labor at every step because, really, there's only isomorphisms.
The category theoretic definition is in a sense cleaner. The set theory definition is sort of stuck as a binary operation, because it's built using pairs/tuples. But the category definition just says "there is some collection of arrows such that yada yada commutes". That collection is usually only 2 arrows, for a normal binary product, but it can be arbitrarily many arrows, and all the same arguments will hold just fine. In this sense, the category theoretic definition of product will generalize much more easily.
A: In (traditional) set theory, $A\times B$ refers to a particular set. Which set is somewhat arbitrary, but you have to make some decision. Once you make that decision, then every other choice you could have made for the definition of $A \times B$ is no longer the binary product; it is only in bijection with your blessed "actual" binary product. These arbitrary but technically necessary choices pervade set theory because questions like "is $\{\{a\},\{a,b\}\}$ a member of $A\times B$?" are valid questions with a particular answer.
The story in category theory depends on how you formalize it.  The typical approach is to define a category as a "large" model of a theory in (a suitably powerful extension of) set theory. In this context, the universal property of products doesn't pick out any particular object. Indeed, there's a proper class of objects in $\mathbf{Set}$ that satisfy the universal property of $A\times B$ for a given $A$ and $B$.  All of them are equally "$A\times B$". Similarly, $(A\times B)\times C$ and $A\times(B\times C)$ have just as much of a claim to being $A\times B\times C$ as any other isomorphic object. On the other hand, if we actually want to use the notation $A\times B$, that is if we want a functor $-\,\times =\, : \mathbf{Set}\times\mathbf{Set}\to\mathbf{Set}$, then this requires making a specific choice. From there, the situation is rather similar to the situation in set theory.
A different approach to formalizing category theory is to use a more appropriate logical framework.  On the weaker end of the spectrum is FOLDS. On the more powerful overkill end of the spectrum is dependent type theory or even homotopy type theory. Since this book appears to be about mathematical logic, it's possible it's taking such an approach.  The key fact in this case is that equality of objects is no longer a defined concept and equality of arrows is only meaningful between arrows in the same hom-"set". Now the (strict) associativity of the categorical product is simply not a question you can ask. It simply does not make sense to ask whether $(A\times B)\times C = A\times(B\times C)$. It's an ill-formed statement like $3\land P$ is. It is still meaningful to ask if $(A\times B)\times C\cong(A\times B)\times C$ though. 
This is a formal approach to validate the categorical principle of equivalence which states all (higher) categorical properties should be invariant with respect to isomorphism(/equivalance).  This is the principle behind the ubiquitous practice (both within and outside of category theory) of treating isomorphic objects as equal.  This principle isn't usually true. $\{\{a\},\{a,b\}\}\in A\times B$ is not a property that is invariant with respect to isomorphism. In a formalization of categories in FOLDS, this is true in the sense that for any FOLDS formula we can write, if it holds for one object, it holds for all isomorphic objects. In homotopy type theory (which is intimately related to higher category theory) this is taken even further. The univalence axiom is basically the principle of equivalence taken as an axiom. It states that for all types $A$ and $B$, $(A =_{\mathsf{Type}} B)\simeq (A \simeq B)$ which states that the type of "equalities" between types $A$ and $B$ is equivalent to the type of equivalences between $A$ and $B$. The upshot is that in homotopy type theory, equivalent types can be treated as equal. So $(A\times B)\times C=_{\mathsf{Type}}A\times(B\times C)$ is "true" in homotopy type theory. The cost of this is a much more subtle notion of "equality".
Casari wasn't thinking of homotopy type theory since it didn't exist when the book was published, but FOLDS (or similar frameworks) and the principle of equivalence are much older.
