Villages appear long before defensive fortifications in the record, in many cases. Pure reason is not very good at forming predictive theories about history, as a general rule.
There are many possible reasons for villages, and cultural reasons are a very big determinant of how people live. So are economic reasons. Many of us live in big cities now, and it's generally less safe.
Foraging sucks less than subsistence farming. However farmers are able to put a lot more people into given land area and so farming villages won out.
A village has a lot of land to defend and not many people to do it. The local town or city sized group will just pitch up with many more men and overrun you. All whilst having enough people left for defence. And they are likely to have more access to heavy weapons that can blow your house up from a distance.
Look at human history: lots of villages and religions, also lots of raping and pillaging.
Philosophy of this period (also Locke, Marx, etc) tended to speculate about the past using reason, rather than empirically. A lot of their ideas have been passed down to us.
Hobbes' saw life in the "natural" state "solitary, poore, nasty, brutish, and short." Eventually government arises, using its monopoly of violence to end day-to-day violence, cheating and such.
I don't think the original writers are compelling anymore, but they are hard to shake entirely. Memes die hard.
In any case, I think the reality of people at all times is that cooperation is a fundamental. There are no societies without cooperation, some form of solidarity, love, etc. We could have never survived without it. Violence is also common in history, but we don't need it to survive. We also know that primates, dogs and other creatures have demonstrably empathetic behaviours, a sense of fairness and such.
As I implied at the start, I think the mistake is literal fundamentalism. Human behaviour can't be logically derived from a fundamental nature.
In reality villages will be built, laws written and religions made up.