Thinking of it, this behaviour seems to make a lot of sense: otherwise if anything had installed a global hook (like, e. g., uiautomation does in uia_event_thread_proc) and then the process which requested that dies, that global hook would be staying for every process until reboot; cleaning those up on hook creators process or thread exit (the test shows that it is the latter) avoids that.