[guided]Let us recap the structure. [Gauss's Lemma](/theorems/1719) says $\left(\frac{a}{p}\right) = (-1)^\mu$ with $\mu$ counting how many of $a, 2a, \ldots, \frac{p-1}{2} a$ reduce into the "upper half" $\{(p+1)/2, \ldots, p-1\}$ modulo $p$. When $a = 2$, the multiples $2, 4, \ldots, p-1$ are already positive integers less than $p$, so no modular reduction is needed — they just are, as integers, in the range $\{1, \ldots, p-1\}$. The count $\mu$ is therefore the (genuinely elementary) count of how many $j \in \{1, \ldots, (p-1)/2\}$ satisfy $2j > (p-1)/2$, i.e. $j > (p-1)/4$.
Why the split by $p \bmod 8$? The critical quantity $(p-1)/4$ has an integer part depending on $p \bmod 4$, but the exact integer part (and thus the parity of $\mu$) also depends on the next binary digit, so we must look one level finer: modulo $8$. The four cases give a $4$-periodic sign function, which one then recognises as $(-1)^{(p^2-1)/8}$.
Finally, why does $\mu \equiv (p^2 - 1)/8 \pmod 2$? We verified this case by case. A cleaner perspective: the map $p \mapsto (-1)^{(p^2-1)/8}$ is multiplicative in $p$ modulo $8$ (for odd integers), takes values $+1, -1, -1, +1$ on $p \equiv 1, 3, 5, 7 \pmod 8$, and so matches the pattern of $(-1)^\mu$ computed above. Both "patterns" are completely determined by $p \bmod 8$, so a case check is a valid proof.[/guided]