Suppose for every $i\in\mathscr I,$ $X_i$ is a topological space.
The product space has as its underlying set the product set $X =\prod \limits_{i\,\in\,\mathscr I} X_i$ and as its open sets product sets of the form $\prod\limits_{i\,\in\,\mathscr I} G_i$ where for every $i\in\mathscr I,$ $G_i$ is open and for all except finitely many $i\in\mathscr I,$ $G_i=X_i.$
Now suppose one is asked why the definition is that rather than something else ‒ for example, omitting the restriction to finitely many factors.
The answer that I know instantly is this: This is the same as the topology of pointwise convergence. That is, a net of points in $X$ converges to a point in $X$ if and only if for every $i\in\mathscr I,$ the projection of the net onto the $i$th factor space is a net that converges to the projection of the limit point onto that factor space.
However, there may be other and maybe even better ways of stating the motivation. What are they?
In any category (such as the category Set of sets, the category Grp of groups, ...), the product of objects $A_i$, $i\in I$, is an object $P$, together with morphisms (called canonical projections) $\pi_i\colon P\to A_i$ such that for every object $X$ and family of morphism $f_i\colon X\to A_i$, there exists one and only one morphism $h\colon X\to P$ such that $\pi_i\circ h=f_i$ for all $i\in I$.
Spelling this out for the category Top of topological spaces, leads to the well-known concrete construction.