This question is a struggle for so many. It’s important to keep in mind that there is a distinction—a very important distinction—between God’s active decree and his permissive decree. God actively decrees that he will save a whole mass of people whom he’s chosen from the foundation of the world, from every nation. And God actively decrees that he will send his Son to die on a cross, because he so loves the world that he gave his only begotten Son. He actively decrees that he’s going to, in time, send his Holy Spirit to open their hearts and to give them faith and to keep them in that faith. And he actively decrees that he will glorify them.
He passively decrees that he will allow sin. God does not have to make somebody sin. Ever since Adam and Eve freely—of their own free will—chose disobedience, sin has been our default setting. God doesn’t have to make us sin; he has to make us alive in Christ. He has to actively change our hearts. But he doesn’t have to actively turn our hearts away from him.
Now, we’re responsible for the latter, but not for the former. We’re responsible for our sin because we turn away from God. That’s our choice. And yet, God is responsible for his mercy in saving us.
For example, in Genesis 50, Joseph’s brothers basically left him for dead in a pit and then sold him into slavery to a traveling merchant. But God, through a winding series of circumstances, made Joseph prime minister of Egypt, and his brothers come to him during the famine. When Joseph reveals who he is, they’re terrified, recalling their betrayal. No worries, Joseph tells them: “You meant evil against me, but God meant it for good, to bring it about that many people should be kept alive, as they are today (Gen. 50:20). So they had one intention, but God works all things—even our sin—together for good (Rom. 8:28).
Also in Acts, Peter tells the crowd that they handed Jesus over to be crucified with wicked hands (see Acts 3:12–16). So they’re responsible—even blameworthy. But then he immediately adds that Christ was delivered up according to the foreordination of God, (Acts 3:17–18). He makes the same point as Genesis 50: Those who played a role in Jesus’s crucifixion are responsible for their actions. They really chose to do what they did—it was their will. But God also had a will and purpose behind it all, namely, to save many people.
God is never the author of sin. God is the author of weaving even our sin into a tapestry that displays his glory and mercy. The Bible doesn’t say that all things are good because God predestines them. It says that God works all things together for good for those who love him, who are called according to his purpose (Rom. 8:28).
God created Lucifer, but he didn’t create Satan. He didn’t create an evil opponent; he created a wonderful, beautiful, godly, righteous, and just servant, who then of his own free will turned away. And yet God uses even what Satan does—even what Pharaoh does—even what Herod does—even what you and I do—to weave it into his purposes. Isn’t it a wonderful thing, that God doesn’t just stand on the sidelines, hoping he’ll win, overwhelmed by all of this sin in the world? God already had a plan for how he would overcome evil in his Son, Jesus Christ.