Because so many were armed for snakes, varmints, and other dangers that there was far less violence than with almost any society in history.
I think there may be an argument for the rate of homicides per gun owner in the old west, but not sure about going as far as saying it was "far less violent that almost any society in history". And your rate per gun owner in the west is going to be somewhat skewed outside of urban areas. I mean, there are not a lot of people for you to shoot at when you live out on the hacienda in the middle of nowhere, where your nearest neighbor is 5 miles away.
According to some scholarship, old west towns had some pretty steep homicide rates.
https://cjrc.osu.edu/research/interdisciplinary/hvd/homicide-rates-american-west#:~:text=For%20instance%2C%20the%20adult%20residents,a%20tenth%20of%20a%20percent.
Los Angeles between 1850 and 1865 had an average homicide rate of 198.
Dodge City between 1876 and 1885 had a homicide rate of 165.
Bannack, Montana between 1862 and 1864 had a homicide rate of 367.
All these rates are far above the 2019 homicide rate for Tijuana, Mexico, which was 134.24, the highest current homicide rate of any city on earth.
St Louis has the highest homicide rate of any American city at only 64.54 in 2019.
So I don't think I'd go as far as saying that the old west urban areas were super peaceful. When your murder rate is higher than Tijuana, chances are that you got plenty of bang bang going on. Of course, you could argue that a bunch of those homicides are not gun homicides. I don't know.
Nevertheless, places like Dodge City attempted to curb their out of control murder rates by restricting gun possession in public areas and bringing in some pretty tough hombres to make sure these gun laws were adhered to.