Noah P. answered 06/27/19
Experienced lab instructor specializing in biological sciences
Dipterans have ocelli located between their eyes. These light sensing organs are responsible for the near misses you experience when swatting at flies with your hand. Once a change in light intensity is observed, the fly instinctively moves. Because the monitor is below these ocelli, this may be the reason that they don't move. Couple this with flies' inability to easily distinguish colors and to them the monitor picture may not have changed, thus they do not perceive it as a danger.