Let $X$ be a generic set and let $(Y_i)_i$ be a family of topological spaces. Let $(\varphi_i)_i$ be a collection of functions of the kind $X \to Y_i$. It is possible to determine a topology (that would be the coarser) in which all those functions are continuous, as follows:
1) if $\omega_i$ is an open set from some of the $Y_i$, then $\varphi_i^{-1}(\omega_i)$ is necessarily an open set (because we are supposing the functions to be continuous). So we can obtain a family $U$ of subsets in $X$ given by these pre-images.
2) We can consider finite intersections of members from $U$ obtaining a space $\phi$ that includes $U$ and that is stable under finite intersections. $\phi$ may not be stable for arbitrary unions.
3) Then we can consider the family $\mathcal{F}$ obtained by forming arbitrary unions of elements from $\phi$. It can be proven that $\mathcal{F}$ is stable under arbitrary unions and finite intersections.
The process of taking finite intersections first and then arbitrary unions cannot be reversed because we can obtain a family of subsets that is not stable under arbitrary unions.
Do you know some concrete examples showing why the "reverse" construction fails?