In problem 2.23 of Boyd & Vandenberghe's Convex Optimization, it is said that the following two sets can not be separated by a hyperplane
$$\begin{aligned} C &:= \left\{ x \mid x \in \Bbb R^2, x_2 \leq 0 \right\} \\ D &:= \left\{ x \mid x \in \Bbb R^2, x_1 x_2 \geq 1 \right\} \end{aligned}$$
Why isn't the horizontal line a separating hyperplane for these sets?
Depends on what "separating" means in the context. The line $x_2=0$ provides non-strict separation: the set $D$ is contained in the open half-space while the set $C$ is contained in the closed half-space.
One may want strict separation, under which both sets are contained in disjoint open half-spaces. Such separation is impossible for $C$ and $D$. Indeed, a line that stays strictly above $C$ must be of the form $x_2=c$ for some $c>0$; and any such line intersects $D$.