But I had concern for my holy name, which the house of Israel had profaned among the nations to which they came Therefore say to the house of Israel, Thus says the Lord GOD: It is not for your sake, O house of Israel, that I am about to act, but for the sake of my holy name, which you have profaned among the nations to which you came. I will sanctify my great name, which has been profaned among the nations, and which you have profaned among them; and the nations shall know that I am the LORD, says the Lord GOD, when through you I display my holiness before their eyes. I will take you from the nations, and gather you from all the countries, and bring you into your own land. I will sprinkle clean water upon you, and you shall be clean from all your uncleannesses, and from all your idols I will cleanse you. A new heart I will give you, and a new spirit I will put within you; and I will remove from your body the heart of stone and give you a heart of flesh. I will put my spirit within you, and make you follow my statutes and be careful to observe my ordinances. Then you shall live in the land that I gave to your ancestors; and you shall be my people, and I will be your God. (Ezekiel 36:21-28, NRSV)
Why does God do what God does?
Because we do things that make Him look bad. We defame His name. We profane His name.
So He has to do what He has to to make His name be how it should be, revered, honored, hallowed.
And in doing that, He gives us a new heart and a new spirit so we will follow after Him.
He cleans us and helps us to listen and follow where He leads, why because God is higher than us and loves us even when we profane His holy name.