God is by His nature just and merciful.
Romans 7:7-12
What shall we say then? Is the law sin? Certainly not! On the contrary, I would not have known sin except through the law. For I would not have known covetousness unless the law had said, "You shall not covet." 8 But sin, taking opportunity by the commandment, produced in me all manner of evil desire. For apart from the law sin was dead. 9 I was alive once without the law, but when the commandment came, sin revived and I died. 10 And the commandment, which was to bring life, I found to bring death. 11 For sin, taking occasion by the commandment, deceived me, and by it killed me. 12 Therefore the law is holy, and the commandment holy and just and good.
NKJV
Romans 9:19-24
19 You will say to me then, "Why does He still find fault? For who has resisted His will?" 20 But indeed, O man, who are you to reply against God? Will the thing formed say to him who formed it, "Why have you made me like this?" 21 Does not the potter have power over the clay, from the same lump to make one vessel for honor and another for dishonor?
22 What if God, wanting to show His wrath and to make His power known, endured with much longsuffering the vessels of wrath prepared for destruction, 23 and that He might make known the riches of His glory on the vessels of mercy, which He had prepared beforehand for glory, 24 even us whom He called, not of the Jews only, but also of the Gentiles?