Why did so many ancient civilizations build massive underground cities capable of supporting thousands?