For the sake of reference, let us recap the two ways to define a topology on the set $X = \prod_{a \in A}X_a$ (where $A$ is an arbitrary set and each $X_a$ is a topological space):
- Take as basis the collection of all possible Cartesian products $\prod_{a \in A}U_a$ of arbitrary open sets in each topology. This is indeed a basis for a topology as you can check and the topology generated by it is called the box topology on $X$.
- Take instead as basis the collection of Cartesian products $\prod_{a \in A}U_a$ of open sets in each topology where all $U_a = X_a$ except for a finite number $U_{a_1}, \ldots, U_{a_n}$ of them. This is also a valid basis for a topology called the usual product topology on $X$. The basis can also be defined like your books suggested by "wanting the projection maps to be continuous".
Note that the two options produce the same topology if the index set $A$ is finite. Now, out of the two choices, it does seem like the first one, which you suggested, is the simpler choice. In fact it does not seem to have any immediate issues with it and to answer your question
Can we have examples where we try to make topology by simply taking Cartesian product of the open sets in each topology and then either get a problem in the topology axioms or continuity of the projection map?
the box topology is a perfectly valid topology so no problems with the topology axioms arise. In fact, the projection maps are also continuous in the box topology. So why is the standard topology on $X$ not defined to be the box topology?
The reason is that the box topology does not preserve topological properties well. For example, take the following statement:
- If each $X_a$ is a connected space, then $X = \prod_{a \in A}X_a$ is also a connected space.
This is always true if $X$ is given the product topology i.e. Option 2 in our list of choices above. However, this natural result can fail if $X$ is given the seemingly more natural box topology. Why? Here is a counterexample.
Consider the countably infinite product $\mathbb{R}^\mathbb{N}$ with the box topology (and $\mathbb{R}$ has the standard Euclidean topology). Each $\mathbb{R}$ is indeed connected though $\mathbb{R}^\mathbb{N}$ is not! The non-empty set $B$ of all bounded elements (i.e. $\mathbf{x} = \langle\mathbf{x}_n\rangle_{n \in \mathbb{N}} \in \mathbb{R}^\mathbb{N}$ with coordinates $\mathbf{x}_n$ bounded by some real $M > 0$ like so: $|\mathbf{x}_n| < M$) and the non-empty set $B^c$ of all unbounded elements separate $\mathbb{R}^\mathbb{N}$. This is because in the box topology, both $B$ and $B^c$ are open in $\mathbb{R}^\mathbb{N}$. Indeed, if $\mathbf{b} \in B$ is an element bounded by $M > 0$, then the open neighborhood of $\mathbf{b}$ $U_b = \prod_{n \in \mathbb{N}}(\mathbf{b}_n - 1, \mathbf{b}_n + 1)$ has elements $\mathbf{u}$ bounded by $M + 1$ as $|\mathbf{u}_n| \leq |\mathbf{u}_n - \mathbf{b}_n| + |\mathbf{b}_n| < 1 + M$. So $U_b \subseteq B$ and we conclude that $B$ is open. Similarly, you can show that $B^c$ is open. This problem does not occur in the product topology because the set $U_b = \prod_{n \in \mathbb{N}}(\mathbf{b}_n - 1, \mathbf{b}_n + 1)$ is not open in the product topology as all the open intervals $(\mathbf{b}_n - 1, \mathbf{b}_n + 1) \neq \mathbb{R}$.
Next take this statement for instance:
- If each component function $f_a : Y \to X_a$ between spaces is continuous, then the product function $\langle f_a \rangle_{a \in A} : Y \to \prod_{a \in A}X_a$ mapping $y \mapsto \langle f_a(y) \rangle_{a \in A}$ is continuous.
Again, this is always true if $X$ is given the product topology and again it can fail with the box topology:
Consider again $\mathbb{R}^\mathbb{N}$ with the box topology and let $I : \mathbb{R} \to \mathbb{R}^\mathbb{N}$ be the product map where each component function is the $\text{id}(x) = x$ from $\mathbb{R}$ to $\mathbb{R}$. Then, $I(x) = \langle x \rangle_{n \in \mathbb{N}} = \langle x, x, x, \ldots \rangle$. Obviously the identity function is continuous. However, $I$ is not continuous. Take, for example, its inverse image of the open set $\prod_{n \in \mathbb{N}}(-\frac{1}{n}, \frac{1}{n})$ of $\mathbb{R}^\mathbb{N}$. This is just $\{0\}$ because if $I(x) = \langle x, x, x, \ldots \rangle \in \prod_{n \in \mathbb{N}}(-\frac{1}{n}, \frac{1}{n})$, then $-\frac{1}{n} < x < \frac{1}{n}$ for all $n \in \mathbb{N}$, which is possible only if $x = 0$. But $\{0\}$ is not open in $\mathbb{R}$ and $I$ can't be continuous. Again, this problem does not occur if $\mathbb{R}^\mathbb{N}$ has the usual product topology because the set $\prod_{n \in \mathbb{N}}(-\frac{1}{n}, \frac{1}{n})$ is not open in the product topology as all the open intervals $(-\frac{1}{n}, \frac{1}{n}) \neq \mathbb{R}$.
These failures of the box topology show that despite its seeming simplicity, it actually has some bizarre characteristics that do not get along well with other topological properties. For this reason, the box topology is never chosen as the standard topology for product sets unless there are only a finite number of them. Instead it is usually reserved in topology as a source of counterexamples as exemplified above.