Aside: There is actually a further issue: we define ordered pairs, usually via something like the Kuratowski definition,
$$(a,b) = \{\{a\},\{a,b\}\}$$
or some other similar construction. But what is an ordered $n$-tuple like $(a_1,\ldots,a_n)$? The most common definition is that it is a function with domain $\{1,\ldots,n\}$ and where $a_i=f(a_i)$, so that we get back to functions, and you would then need to decide whether you are talking about "ordered pairs" in their "original" meaning, or as "ordered $2$-tuples", which would be different constructions... So for example, it is entirely possible that your second example should "really" consist of ordered $2$-tuples, so that when you write $(1,1)$, that really "means" $\{(1,1),(2,1)\}$, where the first $(1,1)$ is an "ordered $2$-tuple" and the elements in the set $\{(1,1),(2,1)\}$ are "ordered pairs"...
Aside 2. Note also that your second definition can only be used when $I$ is a finite initial subset of the natural numbers (or a set with a given bijection to such a subset), unless you take a more general definition of $I$-tuple... which just drops you back to the question of how to define elements of a product with an arbitrary index set, rather than a set of the form $\{1,\ldots,n\}$. But let us assume we are only talking about index sets $I$ of the form $I=\{1,2,\ldots,n\}$ for some $n\in\mathbb{N}$.
So the answer to your question is that... in the end it doesn't matter.
And the reason it doesn't matter is the same reason that the precise definition of "ordered pair" does not matter. (There are other definitions besides Kuratowski's). In the end, what we want of this "product" is its properties, not its precise construction.
For the ordered pair, to bring it back to that as a way to explain, the property we want an "ordered pair", whatever it may be, to have is
$$(a,b)=(c,d)\iff a=c\text{ and }b=d.$$
How we achieve this is not really important. What is important is that we achieve it in some way, and once we do, we just use the ordered pairs and use this property of them. So long as this is all we use (and not properties of the precise and specific reification of the ordered pair) we are on safe ground.
Likewise with products. The two properties we want the product of $\{A_i\}_{i\in I}$, denoted
$$\prod_{i\in I}A_i,$$
to have is the following:
- For each $j\in I$, there exists a function $\pi_j\colon \prod A_i\to A_j$;
- For every set $S$, if for every $j\in I$ there is a function $f_j\colon S\to A_j$, then there exists a unique function $F\colon S\to\prod A_i$ such that $f_j=\pi_j\circ F$ for all $j\in J$.
(This is the so-called "universal property of the product.") We often actually add the family of functions to the definition of the product, so that we can describe this property using only item 2.
Both of the constructions you describe have these two properties:
For the construction where $\prod A_i$ is the set of all function $f\colon I\to \cup A_j$ with $f(i)\in A_i$ for all $i\in I$, the function $\pi_j\colon\prod A_i\to A_j$ take the element $f$ of the product and define $\pi_j(f) = f(j)$. Given $S$ and the function $f_j$, we define $F\colon S\to \prod_{i\in I}A_i$ by letting $F(s)$ be the function with $F(s)(j)=f_j(s)$. It is now straightforward to show that $F$ satisfies the relevant composition identity and is the only function that has this property.
For the contruction with "tuples", we define $\pi_j\colon \prod A_i\to A_j$ by $\pi_j(a_1,\ldots,a_n) = a_j$; and given a set $S$ and functions $f_j\colon S\to A_j$, we define $F\colon S\to \prod A_i$ by $F(s) = (f_1(s),f_2(s),\ldots,f_n(s))$. Again, it is straightforward to show that this $F$ satisfies the relevant compositional identities and is the unique function with this property.
And the key reason why these properties are "enough" is the following:
Theorem. let $\{A_i\}_{i\in I}$ be a family of sets. Let $P$ and $Q$ be sets, and let $\{p_i\colon P\to A_i\}_{i\in I}$ and $\{q_i\colon Q\to A_i\}_{i\in I}$ be two families of functions such that $P$ and $Q$ each satisfies properties 1 and 2 above relative to the family $\{A_i\}_{i\in i}$. Then there exists a unique bijection $\Phi\colon P\to Q$ such that for each $i\in I$ we have $p_i = q_i\circ\Phi$. Therefore, $(P,\{p_i\})$ and $(Q,\{q_i\})$ are isomorphic up to unique isomorphism.
Proof. Because $q_i\colon Q\to A_i$ is a family of functions and $P$ has property $2$, there exists a unique $\Psi\colon Q\to P$ such that $q_i = p_i\circ\Psi$. Because $p_i\colon P\to A_i$ is a family of functions and $Q$ has property $2$, there exists a unique $\Phi\colon P\to Q$ such that $p_i = q_i\circ\Phi$. We want to show that $\Phi=\Psi^{-1}$.
The uniqueness clause of property 2 applied to $P$ itself with the functions $p_i$ shows that the unique function $g\colon P\to P$ such that $p_i=p_i\circ g$ is $g=\mathrm{id}_P$. Symmetrically, the unique function $h\colon Q\to Q$ such that $q_i=q_i\circ h$ is $h=\mathrm{id}_Q$. Now note that for all $i$,
$$p_i = q_i\circ\Phi = (p_i\circ\Psi)\circ \Phi = p_i\circ(\Psi\circ\Phi).$$
That tells us that $\Psi\circ\Phi=\mathrm{id}_P$. Symmetrically,
$$q_i = p_i\circ\Psi = (q_i\circ\Phi)\circ\Psi = q_i\circ(\Phi\circ\Psi),$$
so this tells us that $\Phi\circ\Psi=\mathrm{id}_Q$.
Since $\Phi\circ\Psi=\mathrm{id}_Q$ and $\Psi\circ\Phi=\mathrm{id}_P$, we conclude that $\Phi=\Psi^{-1}$, so $\Phi$ is a bijection. Uniqueness follows from property 2. $\Box$
(The above is a typical argument from Category Theory, applied to sets.)
This tells us that it doesn't matter how I realize the product construction, vs. how you realize the product construction. As long as the thing we are interested in is that it satisfies properties 1 and 2 above, my construction and your construction will be isomorphic up to a unique isomorphism, and therefore we don't actually care how they are instantiated, so long as they are somehow instantiated. Because there will be a unique way to translate from any one instantiation to any other instantiation.
So you can just pick your favorite construction that achieves properties 1 and 2, and after you establish it does... forget what the construction actually was and just use the properties it has. Just like we do with ordered pairs.
(As a quibble I will say that with the (imho correct) viewpoint of the matter, what you describe are not two "definitions" of the cartesian product, but rather two constructions of the cartesian product...)