Why did God create the devil, when he can destroy the devil?

The Bible does not provide a definitive answer to this question. However, some theologians believe that God created the devil as a way to test humanity's faith and obedience. By giving humans the choice between good and evil, God allows us to choose our own paths and to learn from our mistakes. Ultimately, God's plan is for us to choose good and to be saved.