There is an Java Bug for this that has been closed as "Not an issue" - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4414101. (Kudos to Tom Anderson for finding it.)
The Evaluation section of the Bug is really enlightening.
It starts by talking about dealing with "asynchronous" exceptions; i.e. the ThreadDeath
exception that is how the (deprecated!) Thread.stop()
method is implemented. The mysterious handler ensures that the monitor lock is released even if the "thread stop" happens at the critical point where the JVM is trying to release the lock.
Then Neil Gafter adds that even the hypothetical infinite loop (as described in this Question) is correct behaviour according to the JLS. The JLS says that monitor will always be released before the thread continues. If it is impossible to do that, then putting the thread into an infinite loop is more correct than doing anything else.