On another site, the answer to this question is "...The reason is because flies have "compound eyes".
This type of eye cannot cope with a moving image, it can see only stationary things. Hence when a fly flies straight, it can see an image, but when it turns (changes direction) that image is moving relative to the fly's compound eye. This is then no longer a stationary image, maybe the fly would call it a blur.
Hence the fly flies in a series of short straight lines, during each short straight part of the flight the fly can see one image well.
If it notices something at the edge of its vision, and wants to take a proper look, it adjusts its flight path so that the desired image is more in the centre of its field of view, in this way the image appears stationary to the fly while it flies in this new direction".