People believe revenge or "violence" to be illogical, impractical and immoral
Yes, you find people who subscribe to any and all beliefs one could imagine. You would have to define what you mean by "people". Do you mean the overwhelming majority? Everyone? A few?
There most certainly are or have been many, many people who believe the exact opposite: that revenge and especially violent revenge is very logical, practical and not only moral but a sine-qua-non.
Could revenge, the product of anger and hatred, be logical and moral?
Absolutely, yes. First of all, revenge is not necessary related to emotions like anger and hatred. Revenge is best served cold, and can be a strategy driven purely by non-emotional arguing, often formalized in a revenge-based Honor System which can absolutely be driven by some kind of internal logic.
For example, let's assume that I am a villager in a small Sicilian village, far off any larger city, sometime in the early 20th century. I am part of a normal-sized (i.e., sizeable) family, and am regularly communing with other similar families. Now let some member of a different family harm me or someone close to me in some manner; let's say they call my sister a bad name in a village fair, implying she had premarital intercourse.
This may or may not drive my emotions, but most importantly, it can lessen the chance of her ever finding a caring husband. In the early 20th century this could easily have destroyed the life of my sister and make the rest of her life miserable indeed. Further, assume that I am not present during the event, so cannot directly interact with the perpetrator. I am now, by the honor system of that time, forced to enact revenge.
By revenging my sister, I can restore her honor in the eyes of other people, or at the very least make sure that the other families know that if they hurt my family, their family will be hurt right back. This will make it, even if I cannot clear my sister's name, make it less likely that something similar happens against me or my family in the future. In a society like this, it is my moral obligation to act, lest my family is wiped out sooner or later. How exactly I do that does not matter - I could go and spread lies about one of their females, or I could use violence; in any case it must be quite known that it was me (or someone from my family) doing this for the slight enacted upon my sister, to be functional.
Contrary, if I do not revenge her, me or my family will become a welcome target for not so enlightened other families. We might develop a reputation of being an easy target. Maybe next time they will not just call us names, but instead steal our cattle, or rob our jewelry.
All of this can be formulated in proper, formal logic. No matter whether you think it's good or evil, practical or moral, it is absolutely logic in the sense that every step along the bloody way can be perfectly explained; and any member of that society would be able to predict what would happen if they act against the other family and get caught. Little of this is random or unforeseeable, or purely driven by blind emotion.
Obviously many people believe that other systems are better (for example, replacing individual revenge by formalized punishment, put firmly in the hands of the authorities), but this does not change the fact that societies like the one described above exist or did exist, and that the act of revenge was or is perfectly logical within them.
Some further readings: