Supposedly Mahatma Gandhi was the originator of the famous line, "An eye for an eye makes the whole world blind." Well, obviously he was borrowing from (and denying) the Bible... much like Satan did in Eden. The eternally wise God of heaven was the originator of the "eye for an eye" principle of justice. Essentially God was advocating equality in punishments. Even today we understand that punishment for a crime should fit the crime itself. That was the root of what God was teaching through Moses.
The concept of exact reciprocity serves two primary functions in human society. First, it prevents injustices by limiting those who are in authority. A standard of mirror punishments prevents the powers that be from allowing their passions or biases to taint their judgment in a way that would result in overkill in their attempts at the execution of justice. Second, it also bars the miscarriage of justice by requiring fair retribution even in cases where a judge might tend toward leniency. Chronic leniency can eventually evolve into anarchy and amorality (Ecclesiastes 8:11). So, "an eye for an eye" is indeed a very fair, just and righteous adage.
But, is justice the only objective in God's heart? Hardly! He also values mercy (Romans 3:25-26 & Psalm 85:10). Strangely, despite Gandhi's unregenerate station, the Mahatma was actually (and inadvertently) on to something legitimate. He saw the ineptitude of "The Law" to ultimately fix humanity... but, he missed the true solution. The solution is Jesus. Jesus came and preached a higher principle (Matthew 5:38-42) He didn't deny or destroy the law. In fact, He fulfilled it to the max. When Jesus died on the cross he epitomized God's demand for exact reciprocity. Yet, in doing so He ushered in a better way. Jesus replaced the "eye for an eye" principle with a “turn the other check” principle.