In SEO, alt tag is an important On-Page SEO element. It is used because it defines the image that it is about what as web crawlers can't read the image. Therefore alt tag is used for this purpose.
When your image can be downloaded due to slow internet speed, keyword in alt tag is shown to users instead of the image and online user can understand that image was related to the keyword mentioned in alt tag.