The original closing loop was implemented to make sure child proceses have a few dozen descriptors free when started.
Another aspect is to ban inherited filedescriptors from reading data from the pty. That is a security topic. Not sure how hard it is nowadays to keep a filedescriptor secretly opened to a pty or tty and have it returned to the pool for re-use. On the old hpux multi-user system we had at the campus at that time, it was easy. That should be called a kernel bug, if still possible, I suppose.
If secure, I'd suggest to limit the loop to close the lower 4000 or so.
The exit status of screen is not well defined, I am afraid, There are some invocations that report a count of avalable sessions through the exit status (what a hack), but --version should happily exit(0) .
cheers, JW-