This website contains age-restricted materials including nudity and explicit depictions of sexual activity.
By entering, you affirm that you are at least 18 years of age or the age of majority in the jurisdiction you are accessing the website from and you consent to viewing sexually explicit content.
Not just that. Centralized settlements allowed for pooling resources, better grain storage, and easier production of high-calorie items such as bread.
I don’t think that’s how it came about. At first it was “we build our houses together and pool our grain so we can better defend ourselves against aggressors”, then “oh those guys at the temple are pretty good at keeping count and dividing the food among us”, then “oh this organization helps us produce surplus food so now we can have dedicated guards who train instead of growing food”, then “oh the priesthood sure became powerful now that they control the guards”, etc…
The monopoly on violence is an extremely modern concept which is easy to oversimplify, especially in historical contexts which can be very varied. The things you mention are really local to medieval Europe and don’t necessarily translate well to other settings.