Intuition for basic fact surrounding Gaussian integers. What is the intuition behind the following fact?

Among the odd primes:

*

*Those that have remainder $3$ upon division by $4$ remain prime in $\mathbb{Z}[i]$.


*Those that leave remainder $1$ can be factored in $\mathbb{Z}[i]$.

 A: Suppose that $p$ can be written as a sum of (integer) squares, say $p=a^2+b^2$. Then we have $p=(a+bi)(a-bi)$ in $\mathbb{Z}[i]$ and $N(a+bi)=a^2+b^2=p$, so $a+bi$ is not a unit. Similarly $a-bi$ is not a unit. Therefore if $p$ can be written as a sum of squares, then it is not prime in $\mathbb{Z}[i]$.
On the other hand, if $p$ splits in $\mathbb{Z}[i]$ then (since $\mathbb{Z}[i]$ is a PID) we can write $p=\pi_1\pi_2$, where $\pi_1=a+bi$ and $\pi_2=c+di$ are prime elements. Taking norms of both sides leads to
$$ p^2=(a^2+b^2)(c^2+d^2) $$
and since $\pi_1,\pi_2$ are not units it follows that $a^2+b^2=p$, so $p$ can be written as a sum of two squares. (With a bit more work, one can show that $\pi_2=\overline{\pi}_1$).
Therefore the problem of which primes split in $\mathbb{Z}[i]$ is equivalent to the problem of which primes are the sum of two squares. Since $2=1+1$ (and $2=(1-i)(1+i)$ in $\mathbb{Z}[i]$), we really only care about odd primes.
By using the fact that squares are always $0$ or $1$ mod $4$, it follows that if $p=a^2+b^2$ is an odd prime then we must have $p\equiv 1$ (mod $4$). It takes a bit more work to show that every prime $p\equiv 1$ (mod $4$) can in fact be written as a sum of two squares, but there are several approaches. One nice approach is using Minkowski's convex body theorem.
