The alt attribute is an important criterion for SEO. Search engines crawlers cannot parse graphic contents. That is why they use the alternative text to return consistent results, like in Google images.
The alt attribute is used in several cases unrelated to SEO:
Specify a relevant alternative attribute inside an <img> tag for each image on your website, e.g.
Some images do not define the alt attribute: