The Coercion Cycle describes how aggressive and antisocial behaviors develop in relationships.
The coercion cycle has been studied at length and what we know is that negative behavior persists (and often gets worse) because of random reinforcement (feed the fire and it will get bigger, even if it was only smoking ashes.)
Sometimes a student gets something they want (reward) and sometimes they get something they don't want (punishment.) Think a Vegas slot machine. We put money in, press a button or pull a level, and sometimes we get a pay out, and sometimes we just loose the money. People keep putting money into the machine because there is always a chance that I might get what I want. The slot machine is providing random reinforcement and we are willing to gamble on the chance that we might get a pay out. Kids operate in a similar fashion. If they think there is a chance that they will get attention or get out of something they may gamble on it.
In a classroom setting an example of the coercion cycle can begin with a student, who is trying to avoid a task, asking to be excused to go to the bathroom. The teacher responds, telling the student "no" and asking the student to get back to work. The student ignores the teacher and ups her effort. This time she tries again either begging "But I really need to go, please may I, please!" or even aggressively escalates "F-you, I want to go, now!" Remember the student doesn't know if it will work but it has worked at some point somewhere. We, as the teacher, have a choice to respond in number of ways. Some approaches will continue the coercion cycle. We can ignore the student and eventually throw up our hands and say "Fine, go." - slot machine worked. We can power struggle with the student "I said no, so you better sit down. I'm the teacher, you do what I say" student freaks out more and we end up giving up - slot machine worked.
Instead, we can break the coercion cycle at the very beginning. When the student asks we refer to the rules and routines we have taught the students. E.g.: "Johnny, thank you for asking, (positive reinforcement of appropriate behavior) I understand you want to go (empathy). Remember we can't be in the hallways during the first 10 minutes of class/task/etc. You can use the hall pass in 3 minutes! Now, let's look at the equation together." In this example the student was given an answer that wasn't a definite and the escape was still available but after a predetermined time. Additionally, we have maintained a positive relationship by offering help. Any conflict and power struggle was taken out of the interaction.
Please note that we cannot prevent students from attending to their basic needs! However, if a student leaves your class for extended time same time each day or always during a specific task, it might be beneficial to talk to the student and find out what is happening.