Because, in the first case, the PutPixel just runs twice, resulting in two dots.
In the second case, the PutPixel runs from the 'o' coordinate to the '700' coordinate, so it draws all pixel from o to 700, provided that o is less than 700.
You could even have in an if-statement a condition that contradicts the condition that started the if statement. For example, the following code would run normally:
1 2 3 4 5 6
if (x == 100)
{
//some stuff here
x++;
//some more stuff
} //end if