There are a few cases in which you might want to extract text from an image file. What file format your image is in doesn't matter here, you can easily convert from JPG, PNG, TIF, WEBP, and more.
Scans: If you scan articles, papers, receipts, invoices, any paperwork, it might be that they are saved as images.
Screenshots: Taking a screenshot of a page usually results in a PNG or JPG image.
Photos: In order to pay attention to a presentation, speech, or conference, it's oftentimes easier to just snap a quick photo of the slide or presentation and then listen to the speaker again.
To work with the text, search for certain keywords, copy and paste quotes, and saving paperwork digitally, a text document is more practical than an image format.