Why did He give Himself? So that we can be cleaned up! He had to die. We have to recognize this death, so there can be the forgiveness of sin, that we might repent, and that we might be a fit receptacle of His Spirit. God will not put His Holy Spirit into a "dirty" receptacle. The underlying meaning of holy is "clean." It also suggests "different."
God's Holy Spirit is not defiled and dirty - unlike the spirit we have by nature, the spirit of this world, human nature. God's Spirit is different! The spirit of human nature is murderous, hateful, and iniquitous in every way. God's Spirit is holy, righteous, good, pure, kind, gentle, merciful, submissive, and childlike. Every good quality we can think of is resident within that Spirit. Will God defile it by putting it into a vessel that is not fit for it? No. So we have to be led to repentance - there has to be a change.
What does baptism symbolize? Death and purification. After baptism, God considers us clean enough to put His Spirit in us. If there had not been the sacrificial death of the Creator God, and on His death a will or testament left, none of this could ever have occurred. Unless He died, there would be no recipient for the blessings! There could be no New Covenant, because the Spirit could not be given.