Example 1 (1993 National High School League Question) The union of sets $A$ and $B$ is $A \cup B=\left\{a_{1}, a_{2}, a_{3}\right\}$. When $A \neq B$, $(A, B)$ and $(B, A)$ are considered different pairs. The number of such $(A, B)$ pairs is ( ).
A. 8
B. 9
C. 26
D. 27
Solution: Choose D. Reason: Because each element $a_{i}$ has the following three possibilities: (1) $a_{i} \in A, a_{i} \notin B ;(2) a_{i} \notin$ $A, a_{i} \in B ;$ (3) $a_{i} \in A, a_{i} \in B(i=1,2,3)$. By the multiplication principle, the number of ways to form the set pairs is $3^{3}=$ 27.