The ring of integers $\mathcal O_K$ of a number field $K$ is defined as the set of roots of monic polynomials with integer coefficients to mimic the relationship of $\Bbb Z$ to $\Bbb Q$: $a \in \Bbb Q$ is in $\Bbb Z$ iff it is the root of a (monic) polynomial of the form $x - b$ with $b \in \Bbb Z$.
If we relaxed the condition to allow arbitrary polynomials in $\Bbb Z[x]$, then any rational number $r/s$, being a root of $sx - r$, would be an "integer" and the ring of integers would coincide with the field it lies in (since $K = \operatorname{Frac}(\mathcal O_K$)), making the definition useless.
This motivates the definition of an integral element for arbitrary ring extensions too.