In order to answer your question, we will consider that God had His purposes in creating Satan; purposes BEFORE he rebelled against God and purposes AFTER his fall.

1) God’s initial PURPOSES in creating Lucifer is seen in Ezekiel 28:12-15 which reads: “Son of man, take up a lamentation for the king of Tyre, and say to him, Thus says the Lord God: “You were the seal of perfection, full of wisdom and perfect in beauty. You were in Eden, the garden of God; every precious stone was your covering: the sardius, topaz, and diamond, beryl, onyx, and jasper, sapphire, turquoise, and emeralds with gold. THE WORKMANSHIP OF YOUR TIMBRELS AND PIPES WAS PREPARED FOR YOU ON THE DAY YOU WERE CREATED. YOU WERE THE ANOINTED CHERUB WHO COVERS; I established you; You were on the holy mountain of God; You walked back and forth in the midst of fiery stones. YOU WERE PERFECT IN YOUR WAYS FROM THE DAY YOU WERE CREATED, till iniquity was found in you” (NKJV). Though this chapter begins with a description of the “prince of Tyre” (a mere man), the passage just quoted goes beyond the “king of Tyre” and speaks of a mighty CHERUB (which is an “angel”) who was created in perfection, who was “full of wisdom and perfect in beauty.”

The capitalized words suggest there was a DOUBLE PURPOSE for Lucifer’s creation, with the FIRST being to “lead the angelic hosts of heaven in praise to God.” Timbrels and pipes were musical instruments used through the Old Testament (see 1st Samuel 10:5 and Psalm 149:3), and thus many believe Lucifer was the “leader of the heavenly choir” before his fall. One commentator writes, “His entire being was an instrument of praise.” The SECOND purpose would be to “cover (i.e. guard) the Throne of God.” We see elsewhere in Ezekiel that this was the purpose of all the cherubim (10:1-14) and thus it would appear that Lucifer was the chief cherub, the highest angelic being that was created specifically to bring glory to God in these two ways. How ironic that the one who was created to guard God’s Holy Throne became the one who desired to dethrone God and to sit on that Throne as God. We see this brought out in Isaiah 14:12-14, “How you are fallen from heaven, O Lucifer, son of the morning!…For you have said in your heart: ‘I will ascend into heaven, I will exalt my throne above the stars of God…I will ascend above the heights of the clouds, I will be like the Most High.”

2) Lucifer’s rebellion did NOT take God by surprise, for God is Omniscient (All-knowing…see Job 37:16; Psalm 147:5; Isaiah 46:9-10 and Acts 15:18). God knew that Lucifer would fall and become the Devil and Satan (see Revelation 20:2) and yet He had OTHER PURPOSES in my mind for him AFTER HIS FALL, purposes that would bring glory to God and blessings to man. God would allow, in His sovereignty, the Devil to introduce sin into the Garden of Eden to test man and that man too would rebel against God by eating of the forbidden fruit (see Genesis 3:1-6). God had foreseen this fall too before He had created Adam and Eve and yet He determined, before time began, to provide salvation for mankind. He would send His only begotten Son into this world to redeem believing sinners “with the precious blood of Christ, as of a lamb without blemish and without spot. He indeed was foreordained before the foundation of the world, but was manifest in these last times for you.” In providing a Savior for man God would be glorified even more than He would have been had Adam and Eve not sinned, for their sin was the occasion to display His marvelous love and grace and forgiveness to them! So, even though Lucifer rebelled against God and became the Devil, God USED HIM TO TEST MAN which led to their fall and God’s purposes in redemption, a redemption that would bring infinite glory to Him (see John 12:23-28; 13:31-32 and 17:1-4) and  innumerable blessings to sinners who would trust in the Lord Jesus Christ as their Savior from sin (see John 3:16; 5:24; Romans 3;21-26; 5:1; 8:1, 35-39 and Ephesians 1:3).

It is true that Satan has “caused havoc on God’s creation,” even in the lives of true believers, but even in this God is USING HIM TO TEST BELIEVERS so they can learn valuable lessons and grow spiritually. We know from Job 1:6-19 that God allowed Satan to test Job by destroying his livestock, servants and even his children. How did Job respond to this test? Verses 20-22 tell us, “Then Job arose, tore his robe, and shaved his head; and he fell to the ground and WORSHIPPED. And he said: ‘Naked I came from my mother’s womb, and naked shall I return there. The LORD gave, and the LORD has taken away. BLESSED BE THE NAME OF THE LORD.’ In all this Job did not sin nor charge God with wrong.” Satan was but a tool in God’s hand in all of this which led to God being glorified and Job’s faith in God being confirmed and strengthened. In 2nd Corinthians 12:7 we see another saint being tested by Satan, “Because of the surpassing greatness of the revelations, for this reason, to keep me from exalting myself, there was given me a thorn in the flesh, a MESSENGER OF SATAIN TO TORMENT ME—TO KEEP ME FROM EXALTING MYSELF” (NASB). Here God used Satan to afflict the Apostle Paul and it resulted in keeping Paul humble! We could cite other examples but these two furnish us with ample proof that God is still using the Devil and Satan to further His purposes. Once His purposes are fulfilled another purpose will come to pass; Satan will finally be “cast into the lake of fire and brimstone where the beast and false prophet are. And they will be tormented day and night forever and ever” (Revelation 20:10). This judgment upon Lucifer who became the Devil will display, throughout all eternity, God’s perfect holiness and hatred of sin; in other words, even in this GOD WILL BE GLORIFIED.  (427.1)  (DO)