The formal reason for this is that $a^2$, modulo $5$, has remainders of $0,1,4$ only (i.e., $0^2 \equiv 0 \pmod 5$, $1^2 \equiv 4^2 \equiv 1 \pmod 5$ and $2^2 \equiv 3^2 \equiv 4 \pmod 5$). For these, the amount to add to get a multiple of $5$ would be $0,-1,1$.
As for what may be considered an "intuitive" way, consider that $x^2 \equiv (-x)^2 \pmod 5$ (actually, it's true for all moduli). Thus, you have the possible remainders, when divide by $5$, being those of just $0$, $1$ (as $-1 \equiv 4 \pmod 5$ gives the same remainder) and $2$ (as $-2 \equiv 3 \pmod 5$ gives the same remainder). Checking just these $3$ values, you get $0,1,4$, as mentioned above.