Why do the subsets $A,B$ have to be open when realising the space $X=A\cup B$ as a pushout (Seifert-Van Kampen)? I am trying to understand the proof to the Van Kampen theorem and an important step in it is decomposing a topological space $X$ into the pushout of its open subspaces $A,B$. It is relatively easy to see that $X$ with the maps $f_A:A\to X,f_B:B\to X$ has the universal property of the pushout and hence is homeomorphic to $A+_{A\cap B}B$ (as I understood it, this basically comes down to the gluing lemma and the uniqueness of the pushout), but it is stated in the proof that the condition that $A,B$ be open in $X$ is strictly necessary and it is suggested that one try and come up with an example as to why. I am having trouble coming up with one, is there a standard example that illustrates why this condition is necessary?
 A: "It is stated in the proof (of the Seifert - van Kampen theorem) that the condition that $A,B$ be open in $X$ is strictly necessary."
This is an ill-chosen expression. That $A,B$ be open in $X$ is a sufficient condition. There are many examples where the theorem is true altough $A,B$ are not open. So "$A,B$ open" is not a necessary assumption the logical sense.
What is meant is that without assuming $A,B$ open the given proof breaks down. And in fact, the Seifert - van Kampen theorem is not true without certain assumptions on $A,B$.
The theorem in its standard form says that in all counterexamples at least one of $A,B$ must be non-open. Here is such a counterexample:
In the unit circle $S^1 \subset \mathbb R^2$ let $A$ denote the closed upper half circle, $B$ the open lower half circle and $C$ the open right half circle. Define $U_1 = A \cup C$ (which is not open) and $U_2 = B \cup C$ (which is open). We have $U_1 \cup U_2 = S^1$, $U_1 \cap U_2 = C$. The intersection is open and path-connected and with $p = (1,0) \in C$ we get
$$\pi_1(U_1,p) = \pi_1(U_2,p) = \pi_1(U_1 \cap U_2,p) = 0 .$$
The  Seifert - van Kampen theorem fails - otherwise we would have $\pi_1(S^1,p) = 0$.
