This all depends on experience, genetic and environmental factors which may contribute to the individual.
At times people are bad, such (a sociopath) because they have a certain chemical missing, the chemical which produces guilt does not exist in their brain. (Now they are born without this chemical and some psychologists may perhaps argue, that it’s an involuntary condition that they cannot help)
Also a community may also turn bad and violent, based on their beliefs and values. At times there is a strong belief that fighting, committing terrorist acts and killing the enemy is a good thing for themselves and nation, yet the rest of society may not agree.