Why do we need topological spaces? Please correct me if I am wrong:
We need the general notion of metric spaces in order to cover convergence in $\mathbb{R}^n$ and other spaces. But why do we need topological spaces? What is it we cannot do in metric spaces?
I have read the answers at Motivation of generalizing the theory of metric spaces to the theory of topological spaces and want to emphasize this example I found in Preuss "Foundations of Topology":

Sorry for the big image, but I want to be sure you know what I mean. So does this mean we cannot describe pointwise convergence in a metric space? Can you elaborate more on this specific example? I don't really see the conclusion.
Another point is that Preuss explains that continuous convergence cannot be described in topological spaces (I am not sure if he is referring just to Hausdorff-spaces here).
 A: The point Preuss makes is that we cannot find a metric $d$ on the set of function such that "$f_n \to f$ pointwise" is equivalent to "$f_n \to f$ in the metric $d$" or $d(f_n,f) \to 0$ etc. Uniform convergence does correspond to a metric (from the supremum-norm). But we can define something more general, a topology, such that we can define $f_n \to f$ in that topology , and moreover in such a way that it exactly corresponds with "$f_n \to f$ pointwise".
The following deficiency of topologies is that a metric defines a topology (but not always conversely) but whereas in metric topologies sequences actually suffice to completely describe that topology, in general topologies this is no longer the case and the familiar (from analysis/calculus) sequence must be replaced by a more general notion of convergence, sequential continuity does no longer suffice (we need general continuity), sequentially compact has to be replaced by general compactness; all of these are mostly improvements (in the sense that the general properties behave better wrt topological constructions), but less familiar (in topology the idea to call a set "compact(like)" iff every sequence has a convergent subsequence, comes from analysis and is older (and often more directly applicable too)).
A: To understand this, I think a good starting point is first having an intuitive idea of what a topological space is, which is something for which I struggled for a long time to find an answer to, and also which I finally believe I've found one. This is in part based on the top voted MathOverflow post on the subject:
https://mathoverflow.net/questions/19152/why-is-a-topology-made-up-of-open-sets
for which I found their explanation a bit deficient, and came up with this one to remedy it.
Intuitively, a topological space is all the data you can collect about the points comprising an object using a collection of rulers, while ignoring the sizes of the rulers - that last part is the essence of the whole famous old joke that a topologist can't tell the difference between hir coffee mug and hir doughnut, at least before taking a bite from the latter, and which, moreover, is not just any data: it's data which also satisfies a certain empiricality criterion which can be described in a meta sort of way as follows:

*

*Your rulers are not perfect, but you know their tolerance, and

*You have unlimited (read, "infinite") patience, but your collaborators do not. They will want proof, and they will want you to be able to produce it in a finite amount of time.

Reasonable? Okay, then here's how it goes. For simplicity, we won't be too fancy with what we call a "ruler" - we'll say a ruler is just a plank with two marks at some stated distance apart. (Note that a ruler with multiple marks can just be considered a superposition of such rulers.) The ruler's imperfection is to the extent of the thickness of the marks, such that if two points are wholly within the marks, then we know that they are less than the stated distance, and if they are wholly without, then we know they are more, but we cannot conclude anything if they are on the marks.
Call these two possible ascertainments that one can make with such a ruler the ruler's elementary judgments. They are the simplest forms of data you can collect about two points on the object in question. The one where the two points are inside are called the inner judgment, and where they are outside, the outer judgment. If the ruler is $r$, we can call the inner judgment it makes $I_r(P, Q)$ and the outer judgment $O_r(P, Q)$, where $P$ and $Q$ are the points we are evaluating.
So far, so good. Note that you can easily prove to your coworker that any judgment you make with these two alone: simply hold the ruler up to the two points and show them. One step, finite time, you're done.
But now things get more interesting when it comes to if we realize that we can also make a series of judgments using multiple rulers in successon. When we do this, we have what we may call a composite ruler judgment. Such a judgment is a logic statement, and can be formed from either the conjunction (AND), or the disjunction (OR), of elementary judgments or of other composite judgments, i.e.
$$J_\mathrm{composite}(P, Q) = J_1(P, Q) \vee J_2(P, Q) \vee \cdots$$
or
$$J_\mathrm{composite}(P, Q) = J_1(P, Q) \wedge J_2(P, Q) \wedge \cdots$$
where $J_j$ may be either composite or be elementary judgments $I_{r_i}(P, Q)$ and $O_{r_i}(P, Q)$ for some rulers $r_i$.
Now, the "empiricism" constraint comes in by the following reasoning, which is why I reference the above MathOverflow post. Suppose I make a judgment of the "OR" type. I want to know if I can always convince my coworker with their finite patience. And the answer is yes: to prove to hir, all I must do is hold up one out of the possibly infinitely-many rulers I used to make the judgment, or demonstrate only one out of the infinitely many composite judgments which, by closure, is also guaranteed to be verifiable.
But for the "AND" type of judgment, in order to show hir, I would have to do all the judgments that make ti up in succession, one after the other. Thus, if I have an infinitely long AND judgment, I'm sunk. Sie will not have the patience for that. Thus, we exclude such judgments. Hence, the set of all allowed ruler judgments, given some set of rulers $R$, is

*

*The elementary judgments $I_r$ and $O_r$ for each ruler $r \in R$,

*The composite OR judgment
$$J_O(P, Q) := \bigvee_{i \in I} J_i(P, Q)$$
for any indexed family of ruler judgments $\{ J_i \}_{i \in I}$,

*The composite AND judgment
$$J_A(P, Q) := \bigwedge_{i \in I} J_i(P, Q)$$
for any finite family of ruler judgments $\{ J_i \}_{i \in I}$.

Now take this: an open set is a set of points such that any pair of them satisfies some ruler judgment. A closed set is then the set of points who fail some ruler judgment. It is then easy to see that the set of all open sets should satisfy the following axioms, once you remember that set operations and logic connectives correspond with the duality that $\vee$ is $\cup$ and $\wedge$ is $\cap$, which should look familiar ...

*

*If we are given arbitrarily many open sets $\{ O_i \}_{i \in I}$, then
$$O_U := \bigcup_{i \in I} O_i$$
is open, and

*If we are given finitely many open sets, then
$$O_N := \bigcap_{i \in I} O_i$$
is open.

Hence, to not be so verbose, admittedly at the cost of intuition, we now throw out all the rulers, all the Boolean algebra and just work with the open sets. To understand topology, replace in your mind "open set" with a "set of points whose membership you can assess by using some combination of rulers and such that you will be able to show someone else who has finite (though unbounded) patience that your assessment is correct.".
(The reason this is not quite the same as the MathOverflow exposition is that there, they treat the set of rulers as the topological space, but  that doesn't really make much sense because if we're talking, say, mugs, we don't want to think of a "mug made of rulers", we want to think maybe of measuring a mug WITH rulers - hence the exposition I give.)
Finally, we can return to the original issue at hand - why metric spaces are insufficient. Well, to do this, note that a metric space's set of rulers is basically those with points a set real-number distance apart. That is, there is one ruler for each real number. But is this a sufficient amount of rulers for everything? Well, suppose you had an object with points that, "in reality" were closer together than any real numbers, yet still not identical. Could you tell them apart now? In fact, we can not-too-hardly construct such spaces, and you could say - I believe - at least, that if you conceive of your measuring rulers as ruling between whole functions at once - as opposed merely to measuring values in the functions' codomains which is how that pointwise convergence is defined - that the functions under pointwise convergence are something like this.
A: If you consider the set of all functions $f\colon I\to \mathbb R$ on some interval $I$ (just to fix some context), then you can consider (at least) two different meanings to the convergence $f_n\to f$ of a sequence of functions to a function. One is pointwise convergence, where we say that $f_n\to f$ precisely when $f_n(x)\to f(x)$ for all $x\in I$. Another is uniform convergence which is a much stronger property: for all $\varepsilon >0$ there exists $n$ such that $\sup |f_n(x)-f(x)|< \varepsilon $ for all $x\in I$. Uniform convergence implies pointwise convergence but not vice versa (e.g., $f_n(x)=x^n$ on the interval $I=[0,1]$).
Now, in any metric space, there is a notion of convergence of a sequence. For the set of all functions as above, there is a metric such that convergence according to it is exactly the same as uniform convergence. However, generally, there is no metric that in the same way captures pointwise convergence. Similarly, in a topological space, there is a notion of convergence of a sequence. For the set of functions as above, there is a topology that captures uniform convergence. There is also (another) topology that captures pointwise convergence. In this sense, metric spaces are too stringent to capture all useful notions of convergence. Topological spaces are much more flexible.
It should be noted that the root of the difficulty is in demanding that that the metric function takes values in $\mathbb R$. This is a rather unnatural requirement. A more axiomatic approach would replace $\mathbb R$ by a suitable structure defined by means of properties rather than a particular model. When that is done (e.g., "A note on the metrizability of spaces", Algebra Universalis, 2015)  one recovers precisely all topological spaces as such generalized metric values where the metric functions take values in what is known as a (Flagg) value quantale. In that sense, the difference between classical metric spaces and topological spaces is that, in the former, one insists on using the value quantale of real numbers.
A: At the end of the first chapter of Willard's text "General Topology" (1970), Willard provides the following elegantly stated motivation for the theory ...

*
$\qquad$The process which topology evolves from, outlined in the next section and the notes, is basic to any pure mathematical discipline. We wish to study a particular property enjoyed by some objects of interest (in this case, continuity of functions on some space) and the efficient way to proceed is to first clean the structure on the space down to the bare bones needed for introducing and developing the property we want. The passage to such abstraction has several well-documented advantages. Among them:

$\qquad$1. Since we have only what is essential, our proofs use only what is essential
and thus clarify the nature of the object of study, and the logical dependence of
the theorem in question.

$\qquad$2. Proofs become easier. Actually, this is a popular professional myth, with
an element of truth. Occasionally, a proof really does get easier as a theorem gets
more abstract, but this is offset by the need for more and more interpretive skill
on the part of those who would use the theorem. What people really mean when
they say "proofs become easier" is something like this: "by establishing some
notation and introducing the right definitions and conventions, we can draw
together all the theorems about this subject and find common characteristics and
even repetitions in their proofs, then prove lemmas which enable us to write large
numbers of proofs more succinctly." If the subject matter is carefully chosen, the
work done in abstracting the properties needed, establishing notation and proving
those lemmas will be more than paid for by the gain in succinctness and clarity
of the proofs later on, and by the acquisition of powerful methods for continued
investigation of the original objects of study.

$\qquad$Such is the case with topology.

Followup:

As regards sequential convergence . . .

In a metric space, you can define the notion of sequential convergence, and the notion of "open sets", and given two metric spaces $X,Y$ and a function $f:X\to Y$, you can show that the following statements are equivalent:

*
$(1)\;\,f$ is continuous.

$(2)\;\,$If a sequence $(x_n)$ of elements of $X$ converges to a point $x\in X$, then the sequence $(f(x_n))$ converges to $f(x)$.

$(3)\;\,$If $U$ is an open subset of $Y$, then $f^{-1}(U)$ is an open subset of $X$.

A topological space requires a notion of "open sets" satisfying some specified properties, but the concept of open sets does not depend on the existence of an associated metric.

Given a topological space $X$, we can define sequential convergence as follows:

*
A sequence $(x_n)$ of elements of $X$ converges to a point $x\in X$ if for each open subset $U$ of $Y$ with $x\in U$, we have $x_n\in U$ for all sufficiently large $n$.

Given two topological spaces $X,Y$ and a function $f:X\to Y$, we define the notion of continuity as follows:

*
$f$ is continuous if for every open subset $U$ of $Y$, $f^{-1}(U)$ is an open subset of $X$.

With that definition, a function between two metric spaces which was continuous in the metric space context is still continuous in the topological context.

Now suppose we have two topological spaces $X,Y$ and a function $f:X\to Y$.

Consider the statements:

*
$(1)\;\,f$ is continuous.

$(2)\;\,$If a sequence $(x_n)$ of elements of $X$ converges to a point $x\in X$, then the sequence $(f(x_n))$ converges to $f(x)$.
Then in all cases we have $(1)$ implies $(2)$, but in some cases, the converse can fail.

In other words, sequential convergence is not enough to define the general topological concept of continuity.
