This is exactly what Paul is driving at in his illustration concerning Moses in v. 15. Paul quotes God’s statement to Moses, on Mt. Sinai, right after the Israelites made the golden calf in the wilderness (Ex. 33:19).
15 For [God] says to Moses, “I will have mercy on whom I have mercy, and I will have compassion on whom I have compassion.”
God chose to have mercy on the Israelites. It was certainly not because they deserved it. It was because he chose to be merciful, to relent. Hence, v. 16,
16 So then it depends not on human will or exertion, but on God, who has mercy.
We cannot choose ourselves for God’s pardon from death row. He chooses who is pardoned, extending his mercy to his elect people according to his will, not ours.
On the other hand, the Lord chooses the people who receive the justice they are due—the reprobate. Paul illustrates this reality, from the Scriptures, with the Lord’s dealing with Pharaoh in Exodus. Verses 17-18:
17 For the Scripture says to Pharaoh, “For this very purpose I have raised you up, that I might show my power in you, and that my name might be proclaimed in all the earth.”
The whole sequence of God’s hardening Pharaoh’s heart in Exodus is rather striking. When Moses and Aaron went before Pharaoh and requested that the Israelites be let go, Pharaoh initially would not acknowledge God and refused the request. Then, at further requests, Pharaoh hardened his own heart. After doing this a few times, it came to the point that the Scriptures say God hardened Pharaoh’s heart. God abandoned Pharaoh to his own stubbornness as a judicial act.
This is similar to what Paul talks about in Rm. 1. God “gave them over” to their own depravity as an expression of his wrath. Wrapped up in God’s punishment for sin is the abandoning of people to their sins along with all the misery and death sin brings.
In Pharaoh’s case, rather than God choosing to have mercy, God chose to harden him. The result was disastrous for Pharaoh, as the plagues occur, his firstborn is struck dead, and his army is destroyed while pursuing the Israelites.
Was there a reason for hardening Pharaoh’s heart? In v. 17, Paul reminds us of God’s purpose. God, through Moses, told Pharaoh why he was dealing with him in such a way. It was to make Him an example before the world; to show God’s power; and to cause God’s name to be proclaimed in all the earth (Ex. 9:16).
Thus, in Pharaoh and in the Israelites, we have two examples—one of God’s justice and one of God’s mercy. Yet, in both incidents, the culprits deserved justice.
That is the case for everyone. We all deserve God’s justice. Nobody deserves God’s mercy. Nobody deserves to be saved. John Stott put it like this:
If therefore God hardens some, he is not being unjust, for that is what their sin deserves. If, on the other hand, he has compassion on some, he is not being unjust, for he is dealing with them in mercy. The wonder is not that some are saved and others not, but that anybody is saved at all. For we deserve nothing at God’s hand but judgment. 
Where in that is there room for personal desires or works to earn God’s mercy? Nowhere! As v. 18 says, “So then he has mercy on whomever he wills, and he hardens whomever he wills.” Can it be said any clearer?
God remains perfectly just. His mercy remains a wonder. Even in his mercy, justice takes place. The only way God’s people can receive mercy is for their sins to be punished, for his wrath for their sins to settle upon someone. To take that just punishment, God provided his own Son, Jesus, to procure our mercy, dying on the cross, receiving God’s justice, the wrath of God that we deserve.
Knowing this, the perplexity of Keith Getty is highlighted, “Why do many Christians shrink from any thought of the wrath of God?” Christians will never experience God’s wrath. Jesus took that wrath upon himself, so that we might receive God’s mercy.
With that in mind, let us cast off any pride we might have. Let us cast off any idea that we are somehow responsible or deserving of our salvation in Jesus.
God’s choice means we do not have to rely on our uncertainty in choice or our imperfect works. As his adopted children, we don’t ever have to worry about our relationship with him. He did it all. We receive all these blessings of his mercy and grace through faith. Rather than shrink from God’s wrath, let us embrace his love expressed in Jesus Christ. Because God is just, we must rest in Him.