Any time you have to read a file format that doesn't have a library available already (or if you want to write that library). Plenty of industries have a de-facto standard file format that's basically text, but with some special command sequences or bracketing (e.g. recently I had someone ask me how to read "PGN" files, which turns out to be the standard way of recording chess games). Chess is a trivial example, but the "STL" format used by a CNC milling machine I've worked with is a pretty similar format.
So imagine I wanted to write a "middleware" piece for that milling machine - maybe it has a slight defect where its width measure isn't exactly the same as its depth measure (I expect modern machines automatically recalibrate themselves, but you can imagine weirder problems that this might not solve). Then I could write a program that would rescale models exported from a CAD application to match the weirdness of my particular machine, by reading the file, making the adjustments, and writing a new file.
For a less industrial example that I've actually done, I worked on a fan translation of a videogame. The scripts were, of course, in a weird format that the original makers came up with, with no publicly available libraries. So I wrote a parser that could separate the actual text lines from the timing information and so forth, allowing the translators to translate.
So imagine I wanted to write a "middleware" piece for that milling machine - maybe it has a slight defect where its width measure isn't exactly the same as its depth measure (I expect modern machines automatically recalibrate themselves, but you can imagine weirder problems that this might not solve). Then I could write a program that would rescale models exported from a CAD application to match the weirdness of my particular machine, by reading the file, making the adjustments, and writing a new file.
For a less industrial example that I've actually done, I worked on a fan translation of a videogame. The scripts were, of course, in a weird format that the original makers came up with, with no publicly available libraries. So I wrote a parser that could separate the actual text lines from the timing information and so forth, allowing the translators to translate.