The Holy Bible does not spell out all of God's reasons for creating the Devil. But it is important for you to know that what ever God created was for the good of man.
When God created the world and everything nice in it, things went wrong when the devil rebelled against his Creator and then humans followed suit, making sin an everlasting element on earth.
According to The Holy Bible, Satan is a person, a being and a spirit. He is not a 'myth', since he is a real individual. The Holy Bible also states that there is one devil, with many demons, ruling the earth, alongside the heavenly Father.
The devil is spoken of as the Serpent, the deadly dragon, Satan, Lucifer and Beelzebub. The Holy Book describes this being as an evil influence or a powerful force.
In today's world, Christians believe that God Created the devil. But that is not true! God created Lucifer, a powerful anointed angel, who was not satisfied with the creation of God. Lucifer wanted to over power God, he wanted to rise above all the angels. He turned against God and didn't remain the anointed cherub that God created him to be.
Most people strongly believe that Lucifer took one-third of the angels and rebelled against God in heaven, where he was defeated and then cast to earth. This is all seen in the book of Revelation 12:4.
The other reason why Satan turned against God is because he watched as God did something for man that He had never done with any other of His creation. When God created man on the earth, not only was man made in the very image of God, but man was then given unconditional authority over this earth, which made Lucifer unhappy.
In one of the verses in the Holy Book, it states that God created Lucifer perfect and without sin and according to most Biblical scholars, it is said that Lucifer or "shining one" or "morning star," was created perfect just like Adam and Eve who were perfect at the time of their creation. In Genesis 1:31, Lucifer was created to worship God and glorify Him.