Thanks for the question. God is indeed all knowing and nothing happens out of his control and knowledge. So when people sin against him, he is not caught by surprise and needs to come up with a rescue plan to deal with the mess. He has always known what he is doing in saving people. Out of his goodness and kindness, he chooses to save mankind who sins terribly by rebelling against him. It is really something that God does that mankind does not deserve. Out of his mercy, God chooses to save some from the eternal punishment they rightly deserve. By sending Jesus to die in their place, God gives forgiveness to them.
Therefore, because of our sins, our default position in front of God is his judgment and punishment. This is what we deserve. But God gives us something that we do not deserve, that is his love shown through his forgiveness in Jesus. That’s why the Bible does not speak of God creating people that he does not save. Rather, the Bible speaks of God choosing some that he saves. It is God’s ultimate goodness and kindness shown to us. So the question for us is whether we have accepted such kindness by trusting God’s son Jesus Christ.