Just as Moses was given a song to leave behind that would lead the people to repentance, Yeshua was given the Spirit to send in His absence that would lead the people to repentance.
God’s desire is to dwell with man as it was in the beginning. As part of the restoration, God has given the Holy Spirit as a pledge of what is to come at the end of the Millennial Reign.