This is an application of Cauchy's inequality, that is: If $M(r)$ is the maximum modulus of $f$ on the circle with radius $r$ centered at some point $z_0$ (say $0$), then $|f^{(n)}(z_0)|\leq \frac{M(r)n!}{r^n}$.
Now from the triangle inequality it follows that $|f(2e^{i\varphi})|=|f(e^{i\varphi}+e^{i\varphi})|\leq|f(e^{i\varphi})|+|f(e^{i\varphi})|=2|f(e^{i\varphi})|$ and by induction $|f(ke^{i\varphi})|\leq k|f(e^{i\varphi})|$. This is for all $\varphi\in\mathbb R$. It follows that $M(k)\leq kM(1)$. But then
$$|f^{(n)}(0)|\leq \frac{M(k)n!}{k^n}\leq \frac{k M(1)n!}{k^{n}}=k^{-(n-1)}M(1)n!$$
This is true for all $k\in\mathbb N$. As long as $(n-1)$ is positive - that is, $n\geq2$ - this goes to $0$ as $k\to\infty$, and thus $|f^{(n)}(0)|\leq0$, making $f^{(n)}(0)=0$ for all $n\geq2$. The only analytic functions satisfying this are the polynomials of degree less than $2$.
The intuition here is that the growth rate of an entire function puts bounds on its coefficients: If it grows at least linearly, quadratically, cubically along some path to infinity, then the coefficient of the linear, quadratic, cubic part can be nonzero. But the triangle inequality enforces at most linear growth, so the only nonzero coefficients are those of the constant and linear parts of the power series.