I think it sort of depends on what time period we’re talking about. Jericho and other walled cities came about after a certain point. By then, there certainly were societies that lived off raiding the less nomadic agrarian societies, not very peaceful or egalitarian.
Jericho had walls when most of the rest of humanity was nomadic hunter-gatherers.
City walls generally weren’t built because people feel safe and secure already.
I think it sort of depends on what time period we’re talking about. Jericho and other walled cities came about after a certain point. By then, there certainly were societies that lived off raiding the less nomadic agrarian societies, not very peaceful or egalitarian.