There's a big difference between saying vigilantism is a result of corruption and saying it is good for society. Copycat shootings are a real thing, and the next ten assassins might have a very different idea from you about which people deserve the bullet.
Didn't say it was good for society in itself - what is best for society is an uncorrupt, competent, and efficient justice/governing apparatus which operates within strict legal bounds. But that's something that easily falls apart and is hard to maintain for long stretches of time. When it falls apart to the point where people start to suffer heavily under it, vigilantism and other anarchic violence is the result.
You don't fix the problem by stopping the vigilantism, you fix the problem by fixing the justice system and governing apparatus. It's like saying that flooding is bad for society - undoubtedly true, but you respond to it by fixing the dams and levees and better controlling stormwater, not by trying to bulldoze water back up the river.
The flooding in a way is also good in the grand scheme of things: it's so horrible that it prompts investment in infrastructure that has other benefits to society like irrigation, recreation, and power generation. Similarly, vigilantism and frontier chaos can be so scary that it often frightens corrupt institutions into reforming and become more efficient and fair - this leads to better results in all other areas of society as well.
