Interrupts and exceptions can happen at any point in a program's execution on a microcontroller, and they are free to modify memory and peripheral registers.
>Load <register>
>Modify register in memory
>>Interrupt happens and changes <register>
>Write incorrect value back to <register>.
These sorts of bugs can be pernicious to debug, and they are easy for novice developers to create.