Yes, this is a bit unclear.
Halmos' goal is to define the notion of an arbitrary Cartesian product. This should generalize the usual Cartesian product of two sets, $A\times B$, but should "work for any number of sets." Before diving into his description, let me point out that this really is nontrivial: how should we think of the Cartesian product of "$\mathbb{R}$-many" sets?
Halmos is about to tell us, essentially, that the Cartesian product of an indexed family $\{X_i\}_{i\in I}$ of sets is just the set of all indexed families $\{x_i\}_{i\in I}$ of objects with $x_i\in X_i$. Maybe more clearly, an element of the Cartesian product is a function with domain $I$; it sends $i\in I$ to the "$i$th coordinate," which must be in $X_i$.
To motivate this, Halmos has us go back to the idea of a Cartesian product. We can rethink Cartesian products as follows:
Fix any two distinct sets, $a$ and $b$. We'll think of the first as "LEFT" and the second as "RIGHT."
Now an ordered pair has two "coordinates," a left coordinate and a right coordinate. We're going to match these up with $a$ and $b$ above: if I have a function $z$ with domain $\{a, b\}$ such that $z(a)=x\in X$ and $z(b)=y\in Y$ (here I write "$z(i)$" for Halmos's "$z_i$"), we want to think of the object $z$ as being the ordered pair $(x, y)$. Informally, $z$ says
$$\mbox{My left coordinate is $x$, and my right coordinate is $y$.}$$
Put another way:
We can think of the ordered pair $(x, y)$ as the function with domain $\{a, b\}$ (which is an unordered pair) mapping $a$ to $x$ and $b$ to $y$.
This is easiest to think about if $a=0$ and $b=1$, or something similar, but Halmos's point is that all we need is that the index set has two distinct elements. Now here's the key linguistic step Halmos makes which I think is confusing at first:
An ordered pair is an indexed set! And the indexing set is $\{a, b\}$, which is an unordered pair.