Its because here even though i = -1, but on comparison with sizeof(i) (which returns a unsigned value ‘4’), the compiler also treats i as unsigned number.
And as i = -1, then converting it as unsigned will result in Large number as the MSB bit would be set as 1.
If i would have equal to non negative number less than 4, it would have entered into the loop.