The following is a letter written to a non-believing friend of mine named Alex, who asked about why God created evil and who fought the battle in heaven. Maybe you have asked the same questions, so I provide here my own limited understanding. My prayer is that it will bring the light of the Father into your life.
You asked, "Were these beings that fought the battle in heaven, men, angels or demons, and how come God in all his wisdom and power screwed up in their (Satan) creation?"
Alex, in Revelation 12:7-10 the Bible tells us Michael and his angels of great power fought the battle with Satan and his followers. As a result, Satan and his angels were cast down out of heaven, into the earth. The war in heaven was not a battle of flesh and blood, but was a battle for the souls of the children of the Father. Look into your own heart and you will see that the heavenly battle is still being fought, and Satan is still trying to capture the remaining spirits of the children of the Father. This is not a war of the temporary flesh, it is a war for the eternal soul, and earth is the last battleground.
This brings us to the second part of your question as to why would the Father have created defective beings like Satan and his followers. I can give you my own understanding, but to know the complete truth, you will have to ask the Father yourself. We humans try to strain the knowledge of the Father through our own limited filter of human knowledge, but it will never work. If we are to gain any insight at all, we need to try to see the universe through the eyes of one smart enough to have conceived such a complex entity, and also powerful enough to have actually created it. I don't tend to know the mind of the Father, but I can share with you my own limited understanding of why the children of the Father were created as we are.
First, we need to realize that in heaven, there has always been, and always will be, right and wrong, good and evil. Although the possibility of evil is always present in both heaven and earth, there is no evil found in the Father, He rejects it wherever it is found. The possibility to do evil did not just come about when Satan was created, nor will it end when Satan is cast down into the bottomless pit. In order to have a free will, one must learn to deal with good and evil, one must learn to conquer evil if we are to remain in the presences of the Father.
Another thing we need to understand is the meaning of the word "life" as it pertains to the soul. We humans put limits on life because of our limited knowledge and understanding. We see the temporary nature of the material things around us and assume we are the same. However the Father puts a further definition to human life when He said in Genesis 2:7 "And the LORD God formed man of the dust of the ground, and breathed into his nostrils the breath of life; and man became a living soul." It is the living soul, which makes man different from other living things, and we need to understand that there are no limitations on the life of the soul. I believe the soul is a unique form of life, and once created, will live on forever. The only question is where will the soul abide, in the loving light of the Father, or in the endless darkness of the bottomless pit?
I believe we are still a work in process, and we have not yet reached our final form. It is the loving light of the Father, which gave us life in the first place, and He is with us always, teaching us what is required to enter the heavenly kingdom. I also believe the soul, once created, is like a blank slate, a perfect seed, and is given the knowledge of good and evil. The soul is then surrounded by good and evil, like a seed is feed water and sunlight, but must also survive during long droughts. We humans are given a free will to choose how we will grow. We are not a plant or a rock; we are a living soul made in the image of our heavenly Father. God does not force us to follow the path of good, just like no one can force the Father to follow the path of good. He lovingly leaves that up to us to choose for ourselves, how we will grow, whom we will love, and whom we will serve. We are like the fruit in a garden, some can overcome the disease and destruction of insects, while others are too weak to repel the evils from without. The power of Satan is too great for many to overcome.
It is not the will of the Father that any should perish, and He is reaching out to the sick, bruised, and dying seeds of the earth, to give them a last chance. He has given us His greatest gift of love so that we might see the truth, and cast out Satan forever, as the Father has already cast him out of heaven. He sent His only begotten Son down to the earth to suffer the evils of Satan, just to show us His love for us, and to give us a way out of our own evil past. It is our acceptance of the Father's perfect gift, which wipes away all of our evil, but it is a gift we must choose. Christ gives us freely what we could not earn on our own, Christ removes our evil sins, the diseases of our souls, and changes our soul forever into the image of the loving Father. Until our souls are re-born through the power of Christ, evil will remain in our hearts, and we will remain under the control of evil.
The sad thing is that not all will seek the wonderful free gift, just as Satan could not give up his own lusts and personal desires; he is overcome with his lust, pride, and greed. However, when the day is done, the light of the Father will be taken away from the earth, and all those choosing to remain will find themselves in the total darkness of the bottomless pit, never again to see the loving light of the Father. As the light of good rules heaven, the evil of darkness rules the bottomless pit, and in that day there will be no good left to restrain the terrors of evil. Imagine how this earth would be if there was no kindness to counterbalance the evil in the hearts of men. In the end good and evil will be separated forever, and we choose today where we will abide. There will always be right and wrong, but there will no longer be a place in heaven for evil, and only good will is tolerated.
Love cannot be taken, or forced from us; it can only be given freely. So the Father did not create mankind as a robot that stands in the corner and says "I love you, I love you, I love you" all day long, while having no real feelings. Nor are we like a rock that sits in the corner and does nothing. In all His wisdom He created a clean and perfect soul in His own image, one which can understand good and evil, and choose for itself who it will love, or if it will love at all.
Alex, I don't think God made a mistake at all, He did not want a pet rock, He wanted a loving spirit like Himself. It is sinners like you and me who make the mistakes, it is sinners like you and me who turn the good given to us in the beginning into evil, and it is God who is trying to save us from ourselves. God is not the problem, you and I are the problem. I don't know if this answered your question, if not, please let me know and we will try again. It is worth the effort to try to know our Father better. If you truly wish to understand, then ask Jesus to help you. If you seek the truth with a pure and loving heart, our heavenly Father will also send His loving Son to you. It is His promise.