God is a holy God and He doesn't dwell where sin is, that is the spirit of disobedience. When God registers sin, He withdraws His presence which is His Spirit. In Exodus 33, God was displeased with Israel and withdrew His presence when he registered an attitude which was not driven by His word and His Spirit, but sent an angel before them lest He consumed them on the way because of their stiff-nakedness. In the case of Israel in Exodus 33, the presence of an angel did not signify the presence of God.