Sherburn does not necessarily act unjustly. He gave fair warning to Boggs, who received more warnings from others who knew that Sherburn was serious in saying that he would accept so much abuse and no more.
The figure punished in this episode is the one carried away by his imagination. Those who allow themselves to do so, without pausing to consider the rights of others, are punished in this text as we see in this example as well as in the example of the King and the Duke.
Sherburn was depicted as a reasonable man who was being harassed by Boggs. Sherburn told Boggs several times to stop his unpleasant and unwelcome behavior toward Sherburn. He gave fair warning, and Boggs asked for his demise. I think it is satirical, and the target is the audience as a whole. Sherburn accuses the crowd of being cowards. They wouldn't be there if there wasn't a mob with them. None of them cared about Boggs as an individual, they just wanted a lynching. Nobody stepped forward to challenge Sherburn, and they left without another word. The reader is forced to think of his/her own stance on the subject, and we come to realize that most of us would also act differently in a crowd than we would on our own. No, Sherburn shouldn't have killed Boggs. No, Sherburn shouldn't have gotten away with it. However, Boggs asked for it by his behavior and by his failure to respect the requests from Sherburn to stop. If anyone in the crowd has not been a coward, two things might have occurred: 1) Boggs wouldn't have died because the brave soul would have stepped up and counseled Boggs to leave Sherburn alone for good and 2) After Boggs' death, Sherburn would've been given a fair trial and found guilty of murder or found innocent by way of self defense.