Exercise 3.5.7 of Tao's Analysis I: A question about direct sums. Exercise 3.5.7 in Tao's Analysis I reads as follows:

Let $X,Y$ be sets, and let $\pi_{X\times Y\to X}: X \times Y \to X$ and $\pi_{X\times Y\to Y}: X \times Y \to Y$ be the maps $\pi_{X\times Y\to X}(x,y):=x$ and $\pi_{X\times Y\to Y}(x,y):=y$; these maps are known as the co-ordinate functions on $X \times Y$. Show that for any functions $f: Z \to X$ and $g: Z \to Y$, there exists a unique function $h: Z \to X \times Y$ such that $\pi_{X\times Y\to X} \circ h =f$ and $\pi_{X\times Y\to Y} \circ g =f$. (Compare this to the last part of Exercise 3.3.8 and to Exercise 3.1.7).

Now, the answer to this exercise, I believe, is $h(z)=\Big( f(z), g(z) \Big)$. My question is about what I have bolded...where Tao clearly wants the reader to reflect on how the function you created relates to two prior exercises. I am having difficulties seeing the connections across these exercises...so I think I am missing some sort of "greater point" when it comes to direct sums, which, as I understand it, is the type of function that $h$ is. 
The referenced exercises are as follows:
Exercise 3.3.8 (last portion):

Show that if $X$ and $Y$ are disjoint sets, and $f: X \to Z$ and $g: Y \to Z$ are functions, there there is a unique function $h: X \cup Y \to Z$ such that $h \circ i_{X \to X \cup Y} = f$ and $h \circ i_{Y \to X \cup Y}=g$. 

For clarification, the function $i$ here was previously defined in the book as an inclusion map (which I can define if necessary). The answer that I derived for this exercise was 
$
h(w)=
\begin{cases}
 f(w)&\text{if}\, w\in X\\
 g(w)&\text{if}\, w \in Y\\
\end{cases}
$ 
Exercise 3.1.7

Let $A,B,C$ be sets. Show that $A \cap B\subseteq A$ and $A \cap B\subseteq B$. Furthermore, show that $C \subseteq A$ and $C \subseteq B$ if and only if $C \subseteq A \cap B$. In a similar spirit, show that $A \subseteq A \cup B$ and $B \subseteq A \cup B$, and furthermore that $A \subseteq C$ and $B \subseteq C$ if and only if $A \cup B \subseteq C$.

I really don't see any connection so any clarity would be greatly appreciated!  The only thing I can really think of is (referencing exercise 3.5.7), if $X$ and $Y$ share elements, it is possible that $f(z)$ and $g(z)$ map to the same object...but I don't see any significance to this. Cheers~
 A: In the case of the direct product we have two objects $X,Y$ (sets) and we construct an object $Z=X \times Y$ together with two special maps $\pi_X: Z \to X$ and $\pi_Y: Z \to Y$ with the special (so-called universal) property 

For each pair of functions $f: Z' \to X$, $g: Z' \to X$ from a set $Z'$ there is a unique $f \times g: Z' \to Z$ that makes all the relevant diagrams commute: $(f \times g) \circ \pi_X= f$ and $(f \times g)\circ \pi_Y=g$.

Note the similarity and differences with the union situation:
We then have a special set $Z=X \cup Y$ and functions $i_X: X \to Z$ and $i_Y: Y \to Z$ such that 

For each pair of functions $f: X \to Z'$, $g: Y \to Z'$ to a set $Z'$ there is a unique $f \cup g: Z \to Z'$ that makes all the relevant diagrams commute: $i_X \circ (f \cup g) = f$ and $i_Y \circ (f \cup g) =g$.

So the union is like the product except that it is a co-product: the direction of all arrows is reversed (the $i_X,i_Y$ go into the union, not from it, and $f,g$ go into $Z'$ not from it, etc. 
We can abstract this a bit further: so far we were working in the category $\textsf{Set}$, where objects are sets and the arrows are functions between sets. We can also consider all subsets of a universal set $X$ to be a category: objects are subsets of $X$, and there is an arrow (not a function!) between $A$ and $B$ iff $A \subseteq B$. The arrow that exists from $A$ to $A$ is called $1_A$, the identity on $A$. Arrows can be composed (if there is an arrow from $A$ to $B$ and one from $B$ to $C$, there is also one from $A$ to $C$; arrows are unique if they exist, so composition is rather trivial). Then the union of subsets (not necessarily disjoint) is an opject $A \cup B$ such that we have arrow $i_A: A \to A \cup B$ and $i_B: B \to A \cup B$ such that

for each pair of arrows $f:A \cup C$, $g:B \cup C$ to a set $C$ there is a unique arrow $(f,g): A \cup B \to C$ such that $(f,g) \circ i_A=f$ and $(f,g) \circ i_B=g$

But what this means in terms of arrows = subset relation is just

Whenever $A \subseteq C$ and $B \subseteq C$, $A \cup B \subseteq C$.

So $A \cup B$ is the smallest set that is a superset of $A$ and $B$ (note the similarity to the definition of the supremum as the smallest upper bound, which is no coincidence.)
Now, finally, in this last powerset category, we can also formulate the product (the analogue of the direct product we had in the very beginning) as
For two subsets $A$,$B$ we have an object $C$ and arrows $\pi_A:C \to A$ and $\pi_B:C\to B$ (so $C \subseteq A$, $C \subseteq B$!) so that 

For each pair of arrow $f: C' \to A$, $g: C' \to B$ from a set $C'$ there is a unique $f \times g: C' \to C$ that makes all the relevant diagrams commute: $(f \times g) \circ \pi_A= f$ and $(f \times g)\circ \pi_B=g$.

which translates to: if $Z' \subseteq A$ and $Z' \subseteq B$ then $Z' \subseteq C$, so $Z$ is the largest subset that is a subset of both $A$ and $B$ (note the similarity with the definition of infimum as the largest lower bound). So $Z = A \cap B$ is the "product" of the subsets in the category of all subsets of $X$, and the union is the "coproduct" (the same with arrows reversed).
This is the kind of similarities in the abstract sense that Tao wants you to see, I think.
