Imagine the scenario: a student (not mine) disobeys a teacher (not me), and the teacher writes him up. The principal disciplines the child - i.e. talks to him & doles out the consequences. The parent of the child then calls the principal - to ask if he fully investigated the events leading up to the infraction. Because, you see, her child is normally such a good child, and he was just frustrated by what was happening, so he acted out.
Did you catch it? The parent was justifying the child's disobedience simply because he was frustrated. It was okay, just this once.
Except it's not. Disobedience and disrespect are just that, and they need to be dealt with appropriately. I can guarantee you that if I were frustrated with my superior and disrespected him, the consequences would be a lot greater than demerits or detention.
Frustration is part of life. At some point, we all have to deal with people and/or situations that frustrate us. Usually more than once. It does not excuse or justify misbehavior. As parents, it's our job to help equip our children to deal with these situations in an acceptable manner, not to try and get them out of the consequences.