If $\alpha$ is a root of your polynomial, since the polynomial is irreducible, we know that ${\mathbb F}_2 (\alpha)$ is actually the finite field having $2^5$ elements, and hence we know $\alpha^{31} = 1$ becuase $31$ is the order of the multiplicative group of ${\mathbb F}_{2^5}$.
Now, what can the multplicative order of $\alpha$ be if $\alpha^{31} = 1$? 31 is a very special number.
Here is the definition of primitive polynomial I am using here.
EDIT: To make matters clear, assume $p(x) = x^5 + x^2 + 1$ divides $x^n + 1 = x^n - 1$ for some $n\in\{0,\ldots,30\}$, then necessarily $n\geq 5$ as $\deg p = 5$. Now, if $\alpha$ were a root of $p(x)$, then $\alpha^n - 1 = 0$ because $p(x) | (x^n - 1)$. Hence the multiplicative order of $\alpha$ must divide $n$.
However, as we saw above, the multiplicative order of $\alpha$ is either 1 or 31 since 31 is prime, if the order were $1$ then $\alpha=1$ which is impossible as $p(1)=1\neq 0$, and so the order of $\alpha$ is 31. So it is impossible that the order divide $n$ for any $n<31$, a contradiction to the previous paragraph.