I cannot respond specifically to the Hanseatic League, however medieval and early modern crime tended to be treated significantly differently than they are today or in the last 2-3 centuries. What I can explain is really confined to criminal violence. Property theft and such was likely treated differently. The scholarly works I'll be citing focused specifically on the Mediterranean and France, but are generally representative for many parts of western Europe during the 13th-16th centuries.
Essentially, crime prevention and law enforcement consisted entirely of fines. You punch your neighbour? Go to court and pay a fine. If you couldn't pay the fine (and/or reparation to the victim), then you had to leave town and wait for things to blow over. Ideally, you'd have family members back at home trying to smooth over whatever crime you've committed. Usually this meant making arrangements with the victim's family, and then sharing those arrangements with local officials and paying a small fee.
So criminal violence was not really treated as something to be prevented, since it was a good source of income. Instead, the goal was simply to limit the degree or manner of violence being committed. For example, thrusting someone with the point of a sword was treated differently from slashing the victim (because stab wounds significantly more deadly), while simply beating the victim with the wide and flat side of the sword would constitute only a minor fine.
So at least when it comes to criminal violence, the idea was to limit how extreme it was without greatly impacting how often it occurred.
Nirenberg, David. Communities of Violence. Princeton: Princeton University Press, 1996.
Smail, Daniel Lord. "Common Violence: Vengeance and Inquisition in Fourteenth-Century Marseille." Past & Present (Oxford University Press) 151 (May 1996): 28-59.
Smail, Daniel Lord. "Violence and Predation in Late Medieval Mediterranean Europe." Comparative Studies in Society and History (Cambridge University Press) 54, no. 1 (January 2012): 7-34.