Yahweh is speaking of his people as if they had been a flock of sheep that he found wandering in the wilderness. He says that he claimed them there for his own.