Why cant $a_n$ be zero in a polynomial function?

That's because the degree of a polynomial is often a very important quantity. And the specification that $a_n\neq0$ is another way to say that $P$ has degree $n$. Or maybe your quote is used to define what "degree $n$ polynomial" means, and then the specification is crucial and unavoidable.

Without the specification, the only thing we know is that $P$ had degree at most $n$. Unless that's exactly what we want, we have to spend a sentence or two to establish the degree and the highest non-zero coefficient. It's cumbersome and mostly unhelpful.


One of the reason we assume $a_n \neq 0$, in general, is the degree of the polynomial.

When you are writing the polynomial $$P(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0\in F[x],$$ we generally assume $a_n \neq 0$ to mean it is a polynomial of degree $n$ with coefficients in the field $F$, where $F[x]$ is the ring of polynomial.