Why were Lucifer and his band of angels created when God knew what would happen to him and the human race?
Your question presumes that God acts in time as humans do: past, present, future. That, however, is a human restriction on God. God created Lucifer for the same reason that God created everything else: to share life. Unfortunately, Lucifer eventually resented his subordinate status and led a revolt of angels. The question “What did God know when?” is framed in terms of human time.
That question dissolves if God is not confined to human time. John Milton may have explained Satan best: “I will not serve” (Paradise Lost).