The optomotor response is an innate behaviour common to fish and all insects. It serves for course stabilization during free locomotion through an involuntary displacement from a straight course. The purpose of this behaviour is to regain the desired course of locomotion.
References
Optomotor response Wikipedia(Text) CC BY-SA