Of course; that's why our ancestors first built walls around granaries.
Yeah, for sure I believe that cities, walls, friendships, food chains, economies, armies, language… this all rests on meeting the basic human needs of shelter (security from elements and hostile actors), food (security from starvation), community (security of a support network).