Yeah, so. About that... here's an infamous cover from the dawn of the genre. Imagine seeing this on the newsstand that fine May in 1888:
The villains there aren't who they might seem to be at first glance. The Indiana Whitecaps were a vigilante group whose aim was enforcing their own concept of justice and morality in their area of that state.
This is little discussed, as the one well-remembered horrible and infamous group dominates this aspect of the history, but there were other groups with varying aims that were not implicitly motivated by race -- as you can see in this case with the punishment of the white girl of "loose moral character".
The arc of this stuff is familiar to those of us who read comics -- the perception of weak federal and local govts which gave rise to the terrible racial struggles in the reconstruction era also gave rise to this. Some particular groups were started with the specific intent of stopping particular outlaw gangs when law enforcement was not equipped to do so. The predecessor to these guys on the cover here was known as the Vigilance Committee of Southern Indiana, which was described by Allan Pinkerton as a group of about 50 men who wore Scotch caps and black cloth masks, and called their leader "Number 1". They were formed to deal specifically with the notorious Reno gang.
While many might've looked the other way while groups like this captured and hanged murderous outlaw gangs that the real law couldn't stop, before you know it...inevitably... participants got that I AM THE LAW notion in their heads, and were tying girls to trees and whipping them, and so on.
Which brings us to Ricksneatstuff's point about the hero. As the vigilantes started going too far, others rose up to oppose them. In one mind-boggling instance, the masked and costumed Missouri Bald Knobbers gave rise to the Anti-Bald Knobbers, to stop them.
That eventually gets us to hero saves girl, and the larger point is that masked vigilantes with various purposes were operating all over the place in this era, scarcely a generation before the foundational golden age creators were born. More than you were looking for in a thread about comic book bondage, probably, but I think it's interesting...
Good stuff! Thanks!