Answer:
GIF is a relatively old format that has three advantages over some other graphic formats:
- size since it only stores a maximum of 256 colors
- it allows for animated images (mng tried to be its successor, but is not so wide spread as gif)
- due to its "age", it is supported by virtually any graphic application
For more details see the related link.