Oppressive invaders must die, that’s just how it is. Nat Turners slave revolt is another example. People complain that he killed innocents. If I was captured and made a slave in some ISIS stronghold, in my escape/revolt I would kill any and all ISIS I could without much discrimination.
Not every missionary or every foreigner was spearheading another opium war. It was not only brutal and unjust to just murder every foreigner in sight, it was also stupid. In making enemies of the rest of the world, they managed to get their asses kicked extra hard.