Why is the orthogonal group $\operatorname{O}(2n,\mathbb R)$ not the direct product of $\operatorname{SO}(2n, \mathbb R)$ and $\mathbb Z_2$?
Solution 1:
Look at the centers: the center of $\operatorname{O}(n)$ is $\pm \operatorname{Id}$. When $n$ is even, this is also the center of $\operatorname{SO}(n)$. Therefore for even $n$ the center of $\operatorname{SO}(n) \times \mathbb Z_2$ is $\{\pm \operatorname{Id} \} \times \mathbb Z_2$, which is bigger than the center of $\operatorname{O}(n)$.
EDIT: This works for $n \ge 3$. For $n=2$, $\operatorname{O}(2)$ is non-abelian while $\operatorname{SO}(2) \times \mathbb Z_2$ is.
Solution 2:
In this answer, we for fun generalize and write out the construction in more detail.
An element in the orthogonal group$^1$ $O(n,\mathbb{F})$ has determinant $\pm 1$. The center is $$Z(O(n,\mathbb{F}))~=~\{\pm \mathbb{1}\}~\cong~\mathbb{Z}_2,\tag{1}$$ $$Z(SO(n,\mathbb{F}))~=~\left\{\begin{array}{c}\{ \mathbb{1}\}\text{ if $n$ odd},\cr \{\pm \mathbb{1}\}\text{ if $n$ even}.\end{array}\right.\tag{2}$$ Here $n\in\mathbb{N}$.
$O(n,\mathbb{F})$ has 2 distinct components $$O(n,\mathbb{F})~=~SO(n,\mathbb{F}) ~\sqcup~ P\cdot SO(n,\mathbb{F}),\tag{3}$$ where $P\in O(n,\mathbb{F})$ is a fixed element with $\det P=-1$.
There is always a group isomorphism from the semidirect product $$ \mathbb{Z}_2 ~\ltimes~ SO(n,\mathbb{F})~~\stackrel{\Phi}{\cong}~~O(n,\mathbb{F}) \tag{4}$$ given by $$ ((-1)^p, M)~~\stackrel{\Phi}{\mapsto}~~ P^p\cdot M, \qquad p~\in~\{0,1\},\qquad M~\in~SO(n,\mathbb{F}) . \tag{5}$$ The factor $(-1)^p$ is the determinant. Explicitly, the semidirect product reads $$ ((-1)^{p_1}, M_1)\cdot ((-1)^{p_2}, M_2)~=~((-1)^{p_1+p_2}, P^{-p_2}\cdot M_1\cdot P^{p_2}\cdot M_2). \tag{6}$$
On one hand, if we choose the fixed element $P$ to belong to the center (1), the semidirect product (6) becomes a direct product. This is precisely possible if $n$ is odd.
On the other hand, for $n$ even, then $O(n,\mathbb{F})$ and the direct product $\mathbb{Z}_2 \times SO(n,\mathbb{F})$ have different centers, so they cannot be isomorphic, cf. answer by Eric O. Korman.
--
$^1$ Here $\mathbb{F}$ is a field with characteristic different from 2.