It's rude to fart loudly in class.
Jim has eaten a lot of beans for lunch and is feeling extremely gassy in his next class.
Jim wants to release the extra gas build up.
Jim asks to be excused to go to the bathroom.
Jim lets it rip while sitting in the middle of his class.
Jim gets to fart in the bathroom without anyone else noticing it.
Jim is embarrassed when everyone reacts to his bodily functions.