The Commodore 1541 disk drive and other IEC devices are self-contained computers. The operating system runs on the drive itself. This setup significantly improves the flexibility. As a side effect, if there is an error during a disk operation, the computer doesn't know about it. Only the drive knows. You had to open the error channel and listen for error codes to check errors.
When you open the error channel and multiple files at the same time, all open files are closed when you close the error channel. Thanks to this fail-proof mechanism, if you encounter a disk error while working with several files, you can close the error channel and safely quit the program without knowing which files are open. You don't have to keep track of open files, since they all will be closed automatically.
However, the 1541 user manual says that automatically closing files in this way is dangerous because BASIC doesn't know they were closed and this is a very dangerous situation!
What is the danger involved in trying to write a file that's already closed? The only risk I see is getting a write error.
I've copied the warning from the 1541 users manual below:
If you close the error channel while other files are OPEN, the disk drive will CLOSE them for you, but BASIC will still think they are open (unless you CLOSE them properly), and let you to try to write to them.
NOTE: If your BASIC program leads you into an error condition, all files are CLOSED in BASIC, without CLOSEing them on your disk drive! This is a very dangerous condition. You should immediately type the statement CLOSE 12: OPEN 15, 8, 15: CLOSE 15. This will re-initialize your drive and make all your files safe.