They have the sea and the rolling hills to protect them from invasions
Chat with our AI personalities
For the purposes of defence. An enemy army cannot invade a city as easily if they are forced to go through the city gates and the invading force can be attacked with projectile weapons from the top of the walls.
The Romans, like everyone else in those days, built walls and fortifications around their towns.
Hadrian
First they sent emissaries around the city-states with god, bribing cites to join with them. Against the hold-outs they advanced by land, with a flanking fleet which threatened the southern Greek city-states, so the cities kept their armies at home defending their walls and so would be unable to unite into a string force, allowing the Persians to take over the cities one by one.
Ancient cities needed organized government because they can't just lay around like pigs. If they were like pigs they wouldn't care if somebody from another place attack and/or kill people. Someone needed to organize things. They organized food for armies, people to build city walls, they trained armies and gave them weapons, clothing, and shelter.