if an exception thrown during the processing of the file, the file is still properly closed. This is not the case is several of your examples.
I don't quite know how they do it (probably destructor-like mechanisms[1]), but in some languages (or OS's), files and DB connections are automatically closed when the EXE or script ends. Thus, if we terminate the execution based on an error, those things are closed automatically.
Maybe languages and tools that you use behave differently. I only call the shots based on my experience. If I don't see something causing problems, I don't focus on looking for language techniques to manage problems that are not there. Something has been spoiling me perhaps......and I like it :-)
[1] Destructors are not limited to OO