When I was a teenager I posed a question to my youth leader, and later to his father the minister of the church. The question was: If God is omnipresent, and knows the outcome of all things from the beginning to the end, and God is pure of any evil, so much so that he had to turn away rather than look upon His son as Jesus took the sins of the world upon himself. Then how could God create Lucifer,with knowledge that this being would later stand against God's own purpose, and become the father of lies. This question was very much avoided and talked around, and eventually I realized that I would not receive an answer from these men.
I now believe I know the answer to that question, God will show you all things if given time and patience combined with prayer.
Free will, God gave Lucifer the choice to become whatever he wished to become. If God as an omnipresent being, only created that which He knew would serve His will then what would be the point. Just as we are given free will Lucifer was given the same choice, and chose to serve his own cause, rather than to serve God's.
I think this is where the concept of: "If you love something set it free, if it comes back to you it is yours forever, and if it doesn't it never was."