God informed Moses that he needed to appoint a successor because he would be gathered to his people (die) and would only get to see with his eyes the land promised to Israel due to his behavior concerning the water at Meribah.
And Moses spake unto the LORD, saying, Let the LORD, the God of the spirits of all flesh, set a man over the congregation, Numbers 27:15-16
God chose Joshua because he is “a man in whom is the spirit.” They had an ordination ceremony in front of Eleazar, the priest, and the entire congregation, where Moses laid his hands upon him to impart some of his honor. Until I read this, I had not taken the laying on of hands very seriously. I thought it was more of an act of prayer, but it is so much more significant: a spiritual connection. I’m sure it was for the people watching to show that Joshua is now in charge, but it was much more. How do you impart honor? He already had God’s Spirit, but Moses transferred honor to him by touching him. God told him to do it, and God gave him the honor he desired him to have.
If the laying on of hands can impart honor, could dishonor also be imparted? Knowing the character of those touching you during certain ceremonies might be a good idea because this seems to be something taken seriously by God.
And Moses did as the LORD commanded him: and he took Joshua, and set him before Eleazar the priest, and before all the congregation: And he laid his hands upon him, and gave him a charge, as the LORD commanded by the hand of Moses. Numbers 27:22-23