The standard set-theoretic way to define functions is that:
The cartesian product of the sets $A$ and $B$, written as $A \times B$, is the set of all ordered pairs where the first element of the pair is in $A$ and the second in $B$: $$A \times B = \{(a,b): a \in A, b \in B\}.$$
(Representing these ordered pairs as sets, and showing that the cartesian product of two sets is indeed a set under the axioms of set theory, are details that we may safely skip here.)
A relation $R$ between the sets $A$ and $B$ is any subset of their cartesian product: $R \subset A \times B$.
(Often, by convention, we write $a \mathop R b$ as a shorthand for $(a,b) \in R$; this is particularly common when the symbol chosen for the relation is not a letter like $R$, but something abstract like $\sim$ or $\odot$.)
A function $f$ from $A$ to $B$ is a relation between $A$ and $B$ (i.e. a subset of their cartesian product) satisfying the following two extra conditions:
existence of images: for all $a \in A$, there is a $b \in B$ such that $(a,b) \in f$.
uniqueness of images: if $(a,b) \in f$ and $(a,b') \in f$, then $b = b'$.
If the relation $f$ is a function, then, for each $a \in A$, there exists exactly one $b \in B$ satisfying $(a,b) \in f$. We call this $b$ the image of $a$ under $f$, written $f(a)$, so that: $$f(a) = b \iff (a,b) \in f.$$
So, what about when $B = \varnothing$? In that case, for any $A$, the cartesian product $A \times B = \varnothing$, since there exist no pairs $(a,b)$ such that $a \in A$ and $b \in B$. (The same, of course, is also true whenever $A = \varnothing$.)
Since the only subset of $\varnothing$ is $\varnothing$, the only relation between $A$ and $B$ is the empty relation $\varnothing$. The question, then, is: is the empty relation a function from $A$ to $B$?
If $A \ne \varnothing$, no, it is not, because there exists at least one $a \in A$, but there can be no $b$ such that $(a,b) \in \varnothing$.
If $A = \varnothing$, yes, it is. In this case, both the existence and uniqueness conditions are vacuously true, since there is no $a \in A$ for which they could fail.
Thus, there is a (single) function from the empty set to any set (including the empty set itself), but there is no function from a non-empty set to the empty set.
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.
Best Answer
If you don't see why a problem is nontrivial, it often helps to consider silly variations of it which are outright wrong.
To start with, consider:
When we write "Show that there exists a function such that [stuff]," what we're proving is that [stuff] is actually a satisfiable constraint. Knowing that the set of all functions with the given domain/codomain exists is irrelevant: we know that if a function with the properties we want exists then it's in that set, but does it actually exist in the first place?
Uniqueness is similarly nontrivial. Consider:
Again, we have a certain property $P$ of functions that we want to understand. The set $\mathbb{N}^\mathbb{N}$ of all functions with the appropriate domain/codomain exists, but that doesn't help answer the question: how many functions $\mathbb{N}\rightarrow\mathbb{N}$ satisfy $P$? (In particular, for existence we need "$\ge 1$" and for uniqueness we need "exactly $1$").