Cartesian products and families
A few simple steps: A family of elements of $A$ that is indexed by $I$ is just a function $f\colon I\to A$, however, usually writing $f_i$ instead of $f(i)$. Thus a "family $z$, indexed by $\{a,b\}$ such that $z_a\in X$ and $z_b\in Y$" is nothing but a function $z\colon \{a,b\}\to X\cup Y$ with $z(a)\in X$ and $z(b)\in Y$. Indeed, $a$ and $b$ are arbitrary (but distinct). Some authors use a fixed choice $a=\emptyset$ and $b=\{\emptyset\}$, but $a=\text{horse}$ and $b=\text{apple}$ would fulfill the same purpose if applicable. After seing this, $Z$ is the set of all such families (but still with fixed choices of $a$ and $b$). Indeed, this is essentially the same as $X\times Y$, as the author continues, if one identifies such a family $z$ with the ordered pair $(z(a),z(b))=(z_a,z_b)$. There is no ordering in $z$ unless we say that $a$ "precedes" $b$. Yet the identification with $X\times Y$ depends on the fact that we associate $a$ with $X$ and $b$ with $Y$, so this makes $a$ somewhat the first element and $b$ the second, if we want to identify $Z$with $X\times Y$ because $X$ is the first and $Y$ the second factor in this artesian product. We can also identify $Z$ with $Y\times X$ (then having ipso facto $b$ "preceeding" $a$). (Now what if $X=Y$?).
Note that in general, a family of sets $\{A_i\}_{i\in I}$ indexed by some index set $I$ is not really ordered unless $I$ is ordered. But nevertheless we know what it means that $\{B_i\}_{i\in I}$ is ordered "in the same way" even though neither is actually ordered. That is, we associate $A_i$ with $B_i$ for the same index $i$ (and not permuting the elements of $I$ on the way).