This is from page 25 of this book:
In general, it may be shown that $\textit{Var}(X) = E(X^2) - [E(X)]^2$
I can't remember ever seeing that "In general" elsewhere.
So if this identity only holds "in general" are there cases where $\textit{Var}(X) \neq E(X^2) - [E(X)]^2$
Even in cases where there is no second moment, I think the identity should hold. Because neither the variance nor the second moment exist. But maybe this is what they're talking about.