It could also be asked, “If all God wants are people who are obedient, why then did He create us with free wills? Why didn’t He create a race of eternally obedient robots?”
The answer is because God is a Father. He wants to have a father-child relationship with us, and there can be no father-child relationship with robots. God’s desire is to have an eternal family of children who have chosen, by their own free will, to love Him. According to Scripture, that was His predestined plan:
In love He predestined us to adoption as sons through Jesus Christ to Himself, according to the kind intention of His will (Eph. 1:4b-5, emphasis added).
If you want to have some idea how much pleasure God would have derived from robots, just place a puppet on your hand, and have that puppet tell you that he loves you! Most likely, you won’t get a warm feeling in your heart! That puppet is only saying what you make him say. He doesn’t really love you.
What makes love so special is that it is based on the choice of someone with a free will. Puppets and robots know nothing about love because they can’t decide anything for themselves.
Because God wanted a family of children who would choose to love and serve Him from their own hearts, He had to create free moral agents. That decision involved His taking the risk that some free moral agents would choose not to love and serve Him. And those free moral agents, after a lifetime of resisting God who reveals Himself and draws all people through His creation, their conscience and the call of the gospel, would have to face their rightful punishment, having proved themselves worthy of God’s wrath.
No person in hell can rightfully point a finger of accusation against God because He provided a way whereby every person can escape the penalty of his sins. God desires for every person to be saved (see 1 Tim. 2:4; 2 Pet. 3:9), but each person must decide for himself.