GIF is a terrible format for video, but OTOH it's fairly lightweight for the browser for simple animation. Historically, playing video in the browser has required loading plugins, increasing the attack surface of the browser quite a bit, as well as inflating memory usage, increasing fragility, etc.
HTML5 video is also blocked by my flash blocker. Up until the latest version of Firefox, animated gifs were blocked by my use of image.animation_mode:once in about:config. Providing the element is clickable, the flash blocker makes it easier to play back the desired video on demand.