In this formula, (A1:A999>B1:B999) will return an array of 999 values, each
of which is TRUE or FALSE. Each minus sign simply multiplies these values
by -1 (hence the two together effectively multiply by 1) which coerces TRUE
to be 1 and FALSE to be 0. This is necessary as SUMPRODUCT only works with
numbers.
The formula works fine for me. As a way of looking into the problem, I
suggest temporarily changing the ranges to something much smaller, for
example
=SUMPRODUCT(--(A1:A9>B1:B9))
If you highlight part of a formula in the formula bar and press F9, you see
the result of that part of the formula. (Press ESC to get out of this mode,
as pressing ENTER would put the result permanently into the formula!)
So, using your example data, if you highlight (A1:A9>B1:B9) and press F9 you
would expect to see
{FALSE;FALSE;TRUE;FALSE;TRUE;TRUE;FALSE;TRUE;TRUE}
Now highlight --(A1:A9>B1:B9) and press F9 and you would expect to see
{0;0;1;0;1;1;0;1;1}
This technique will help you to understand what the formula is doing and may
well lead you to see what is wrong.