This can be useful when you want to disable interrupts, but then only enable them back if they were previously enabled.