for example, Moses wandered the people around the desert for 40 years so they would lose their Egyptian habits
for example, the Law of Moses included death for sins, both major & minor, in an attempt to cleanse the population of bad seed
Yahweh our God delivered him over to us... We captured all his cities and laid whole towns under ban, men, women and children; we spared nothing but the livestock which we took as our spoil".Deut 2:33-35
"Then Yahweh said to Joshua, 'Now I am delivering Jericho and its king into your hands". So, when "the walls of Jericho came tumbling down", the Jewish warriors "enforced the ban on everything in the town: men and women, young and old, even the oxen and sheep and donkeys, massacring them all". Joshua 6:21