Why does God want to gather his people?
From the days of Adam to the last days, the Lord tries to gather his people. But why? Â Joseph Smith explained that in every dispensation, God tries to bring his people back into his presence. The purpose of the gathering is to see God.
Enoch was successful. He gathered the people to become Zion — a people and a place in the presence of the Lord.
And Enoch continued his preaching in righteousness unto the people of God. And it came to pass in his days, that he built a city that was called the City of Holiness, even Zion. And it came to pass that Enoch talked with the Lord; and he said unto the Lord: Surely Zion shall dwell in safety forever….And after that Zion was taken up into heaven, (Moses 7:19-23)
The Hebrew book of Enoch bore the title of Hekhalot, referring to the various chambers or stages of initiation in the temple. Enoch, having reached the final stage, becomes the Metatron to initiate and guide others. (Hugh Nibley, as quoted on page 68 of “Ancient Affinities within the LDS Book of Enoch Part Two” David J. Larsen and Jeffrey M. Bradshaw)
But some were not successful in gathering. Moses went down into Egypt and delivered God’s people — that seems like it was successful. But remember, Moses was not only delivering them from bondage; he was gathering them and preparing them to see the Lord. That’s what he was doing — trying to get the people to ascend mount Sinai and come into the presence of God. That’s our reason for gathering.
This is why Abraham blessed his posterity: He wanted to bring them into the presence of God. … Moses sought to bring the children of Israel into the presence of God, through the power of the Pristhood, but he could not.  In the first ages of the world they tried to establish the same thing—& there were Elias’s raised up who tried to restore these very glories but did not obtain them.  [Cook, Lyndon W. (2009-09-03). The Words of Joseph Smith (Kindle Locations 524-531). Deseret Book Company. Kindle Edition.]
Jesus also tried to gather His people,
O Jerusalem, Jerusalem, thou that killest the prophets, and stonest them which are sent unto thee, how often would I have gathered thy children together, even as a hen gathereth her chickens under her wings, and ye would not! (Matt 23: 37)
Joseph Smith addressed this concept in a sermon in June of 1843:
It was the design in the Councils of heaven before the world was that the principle & law of that priesthood was predicated upon the gathering of the people in every age of the world. Jesus did every thing possible to gather the people & they would not be gathered [Cook, Lyndon W. (2009-09-03). The Words of Joseph Smith (Kindle Locations 4172-4176). Deseret Book Company. Kindle Edition.]
He (Joseph) then asked what was the object of Gathering the Jews together or the people of God in any age of the world, the main object was to build unto the Lord an house whereby he could reveal unto his people the ordinances of his house and glories of his kingdom & teach the peopl the ways of salvation for their are certain ordinances & principles that when they are taught and practized, must be done in a place or house built for that purpose this was purposed in the mind of God before the world was & it was for this purpose that God designed to gather together the Jews oft but they would not it is for the same purpose that God gathers togethe the people in the last days to build unto the Lord an house to prepare them for the ordinances & endowment washings & anointings (Wilford Woodruff’s notes on Joseph’s sermon) [Cook, Lyndon W. (2009-09-03). The Words of Joseph Smith (Kindle Locations 4217-4227). Deseret Book Company. Kindle Edition.]
Franklin D. Richards also recorded his notes on this sermon:
Joseph said The reason why the Jews were scattered and their House left unto them Desolate was because they refused to be gathered that the fulness of the Priesthood might be revealed among them which never can be done but by the gathering of the People also also The Order & Ordinances of the Kingdom were instituted by the Priesthood in the council of Heaven before the World was [Cook, Lyndon W. (2009-09-03). The Words of Joseph Smith (Kindle Locations 4264-4266). Deseret Book Company. Kindle Edition.]
Enoch, Moses, Christ, and Joseph all tried to gather God’s people to bring them into the presence of God, either on a mountain top or the tabernacle in the wilderness or the temples in Kirtland and Nauvoo.
Who gave Joseph Smith the keys of gathering?
On April 3, 1836, Joseph Smith and Oliver Cowdery went behind the veil of the Kirtland Temple, and after a solemn and silent prayer, the Lord Jesus Christ appeared. Â He forgave their sins, pronounced them clean, and accepted the House of the Lord. That vision closing, Moses next appeared, and he delivered the keys of gathering to Joseph:
After this vision closed, the heavens were again opened unto us; and Moses appeared before us, and committed unto us the keys of the gathering of Israel from the four parts of the earth, and the leading of the ten tribes from the land of the north.(D&C 110:11)
Moses held the keys of gathering because God had appointed him to deliver and gather His people during that period. Moses and Joseph are both examples of a deliverer and gatherer. However, since the people were unsuccessful during their leadership, we have yet to establish Zion.
As you follow this idea of gathering throughout the course of history, you will find that sometimes God translates the leader (Moses) and his people (Enoch). Other times, the people rise against the leader and kill him, such as Jesus and Joseph Smith.
Jews—It always has been when a man was sent of God with the Priesthood & he began to preach the fulness of the gospel, then was thrust out by his friends.—and they are ready to but[c]her him if he teach things which they had imagined to be wrong. Jesus was crucified upon this principle—  [Cook, Lyndon W. (2009-09-03). The Words of Joseph Smith (Kindle Locations 4186-4188). Deseret Book Company. Kindle Edition.]
I don’t know why Joseph had to be killed, and Moses translated. I understand why Jesus died as the savior of all humanity. But it is interesting to see that God has called leaders throughout all generations of time to gather His people that they might receive the mysteries of the kingdom of God in the mountains or temples of the Lord, Â become cleansed of all sins, commune with Jehovah and establish Zion.
Therefore, (the Lord told Joseph Smith) sanctify yourselves that your minds become single to God, and the days will come that you shall see him; for he will unveil his face unto you, and it shall be in his own time, and in his own way, and according to his own will. Remember the great and last promise which I have made unto you. (D&C 88:68–69)
[The Words of Joseph Smith is one of my favorite books — you may find a used copy on Amazon, or I have also found a digital copy here   or here, but the one on Kindle does not seem to be available anymore.]