Think of love this way. God — as the Three Person Godhead — creates mankind despite knowing that Adam and Eve are to fall into disobedience and sin, fundamentally changing the nature of all humanity. God the Son knows that one day, He will leave His glory behind to enter time and space to become an infant, grow into a man, minister for a brief three years, then die an agonizing death on a cross. God the Father knows He will — for a time — forsake His Son as Jesus becomes sin for us. God the Holy Spirit knows that He will one day dwell in each individual Christian as coach, comforter, helper, healer, mentor, best friend.
Despite His foreknowledge of our ruin and His sacrifices, rather than say, “Why should I create these people?” God continues His plan to populate the earth with human beings. Because God loves us this much, “we also must love one another.” (1 John 4:11)