It's a bit hard to explain, but look at it this way.
while(my.flag1 == on) { ... }
this tells the engine to do something while the flag is on, but if the flag is turned off, ever, then the engine moves on and never encounters that while loop again. therefore it never checks the state of flag1, and the stuff in the brackets doesn't happen.
while(1) { if(my.flag1 == on) }
not only does that tell the engine to do something while the flag is on, but the loop continues to run even if the flag is off, checking the state of flag1 every frame. in the example at the top, the loop ends which leads to undesirable results.
SO, in your first piece of code, the engine only checks if the game_state = 0 once. If game_state != 0, even for only one frame, the function ends and never runs again. in the second piece, the function loops and always checks the game_state every frame.
Does that help?