The book on Abstract Algebra by Gallian defines "irreducible polynomials" as :
Let $D$ be an integral domain. A polynomial $f(x)$ from $D[x]$ that is neither the zero polynomial nor a unit in $D[x]$ is said to be irreducible over $D$ if, whenever $f(x)$ is expressed as a product $f(x) = g(x)h(x)$, with $g(x)$ and $h(x)$ from $D[x]$, then $g(x)$ or $h(x)$ is a unit in $D[x]$.
I can't understand why $g(x)$ or $h(x)$ has to be a unit in $D[x]$. How will that change things ?
This brings me to another question on a following example:
The polynomial $f(x) = 2x^2 + 4$ is irreducible over $Q$ but reducible over $Z$, since $2(x^2+2)$ and neither $2$ nor $x^2+2$ is a unit in Z[x].
Again, what is the intuition behind wanting the factors to be non-units ?
Basically, I just want to know the logic behind such a definition. Any help shall be highly appreciated.