So, I'm going to answer this question in two parts. Firstly, I will answer a question implicit in the original post: what is the purpose of definitions? Secondly, I will answer the explicit question in the original post: why does the definition of a topology involve an arbitrary union of open sets but only a finite intersection of closed sets?
In mathematics, we make definitions for many reasons. Perhaps the simplest reason is to expedite the communication of ideas. For example, there is a lot of meaning behind the statement "let $X$ be a separable infinite-dimensional Banach space." However, someone who is familiar with the definitions of these objects quickly understands the properties of the space $X$. On the other hand, the formal description of these properties would be significantly longer and cumbersome to write each time we encounter such a space $X$.
Another reason we make definitions is to model (or abstract) some specific idea. For example, we intuitively have a notion of distance, but it may vary based on the situation. Some common distance functions are the straight-line distance, or the Manhattan distance (i.e., vertical plus horizontal distance), or the spherical distance (e.g., the distance traveled along the surface of the Earth). Intuitively, these are all distance functions to us and we want a definition that captures all of these (that is, all of these are distance functions according to the definition we create). Now, the definition of a metric tries to abstract the ideas of distance functions.
Yet another reason we make definitions is to guide our intuition. When we have many examples of objects that satisfy a given definition, these serve as landmarks for our intuition. When we see that a particular function satisfies the axioms of a metric we can begin to get a feel for the behavior of a function for which we have a priori little insight.
These reasons being stated, remember that definitions are created, not given to us from above. That is, at some point, mathematicians created this definition in order to satisfy some of the above properties (and possibly for other reasons). So, in particular, the definition of a topology was created in order to abstract another idea. A topological space can be thought of as a generalized or abstracted metric space. In a metric space, we have a precise notion of the distance between points. However, sometimes we work in areas where we don't have a precise notion of distance, but we do have a notion of "closeness." A topology tries to capture this idea. So, the definition of a topology that we have today is one that mathematicians have determined best fit the idea they were trying to abstract.
To answer the explicit question in the original post, if we are trying to abstract the idea of a metric space to one without a distance function, then we need to come up with something in a metric space that doesn't depend on precise distances. In particular, open sets capture this idea. In a metric space, a set $U$ is called open if for every point $x\in U$, there exists an $\epsilon>0$ such that $B(x;\epsilon)\subset U$ (where $B(x;\epsilon)$ is the ball centered at $x$ of radius $\epsilon$). Notice that we only need the existence of such a positive $\epsilon$. Thus we can interpret this as saying a set $U$ is open if for every $x\in U$, all points "sufficiently close" to $x$ are also in $U$. So it seems as if open sets are a prime candidate to describe closeness. However, the definition of open sets in a metric space does use the metric, so we have to try and find the properties that characterize open sets in a metric space. And since we don't necessarily want any other structure on our space, it is natural to try and characterize properties of open sets relating specifically to unions and intersections.
Thus we ask, in a metric space, under what kinds of unions are open sets closed? It is easy to prove that the answer is arbitrary unions. Again, this makes sense with our idea of open sets capturing the idea of "closeness." For given any point in a union of open sets, $x\in\bigcup_{U\in\mathcal{U}} U$, $x\in V$ for some $V\in\mathcal{U}$. Then, since $V$ is open, it contains all points "sufficiently close" to $x$. Thus all points "sufficiently close" to $x$ are also contained in the union. However, in a metric space, open sets are (in general) only closed under finite intersections. The classic counterexample to the infinite case is $\{0\}=\bigcap_{n\in\mathbb{N}}(-\frac{1}{n},\frac{1}{n})$. All the intervals on the right-hand side are open (in fact, they are balls centered at zero), but the left-hand side is clearly not open. So, the properties that open sets satisfy in a metric space (which don't inherently depend on the notion of a metric) are: closed under arbitrary unions and finite intersections. Thus, this is definition we take for open sets.
Now, the above process gives us the definition of a topology. But how would we know it is the
"correct" definition (by correct I mean one which correctly captures the essence of the idea we were trying to abstract). The only way to do this is by considering examples. The fact that this definition of topology is the one that stuck around shows that it is the "correct" one in the above sense.