It seems to me it is a direct connection to quadradic residues.

Remember from field theory that a polynomial of degree 2 or 3 is reducible over a polynomial ring (in this case the integers under multiplication modulo 8) if and only if it has a zero.

Thus, what we are saying is that

x^2+ax+1≡0(mod 8)

For some x.

We will express this in a more efficient way,

x^2+ax+1≡0(mod 2^3)

That means the discriminant of this quadradic is a quadradic residue of 2.