Retaliation, another word for vigilantism, is based on human primal urges for revenge, and the more primitive legal systems of societies past that allowed the victims or victims families to carry out the sentence of death as revenge.
As democracy and philosophy took hold throughout parts of Europe, and civilizations such as the Greeks and Romans developed further, the concept of law - that is a system of rules applied evenly across a population - developed along with them. Ideas such as impartiality, and juries came soon after, especially once England's Magna Carta was written.
In essence, we still have a system of retaliation, but it is more organized, more uniform in its application, and the defendent has more rights than under previous systems. Vigilantism has been made into a crime.