God knows everything—so He knew Lucifer would turn against Him—so why create him?
It can be said that God either causes, or simply permits, all things to occur in order to accomplish His overriding two-fold goal, namely: (a) That He might receive the most amount of glory (Rev. 4:11) (b) That His elect might receive the most amount of good (Rom. 8:28) (Other scriptures supporting these goals are Gen. 45:4-8; 50:13-20; Rom. 11:33, 34; and Eph. 1:1.