Consider these two cases:
1) There are platform that support nested interrupts, where one interrupt can occur when another hasn't returned yet. The priorities are configured in the interrupt controller registers.
2) Multi core CPU can process two interrupts at the same time, on at each core.
There are many reasons to check if a function is running in interrupt context, i.e: functions that uses thread locking, shall not be executed in interrupt context otherwise a deadlock will occur. These functions might want to check if it is interrupt context and abort with an error.
Also, there are many reasons to disable interrupts, i.e.: when you are writing to a memory structure that will be consumed by an interrupt handler, you might fill up the data in atomic mode (irqs disabled).
One place where both functions are used is in the spinlock function family because spinlocks are good to be used in interrupt context.