Obeying God's commandments is the basic attitude and behavior of God's people. If not, God will discipline them. On the other hand, ungodly people will disobey God's commandments and punishment will fall on them. In any event, the ones who break the law of God can't escape from His wrath freely.
3 Gen 3:17 Then to Adam He said, "Because you have listened to the voice of your wife, and have eaten from the tree about which I commanded you, saying, 'You shall not eat from it';
Cursed is the ground because of you;
In toil you will eat of it
All the days of your life.
9 Gen 18:19 "For I have chosen him, so that he may command his children and his household after him to keep the way of the LORD by doing righteousness and justice, so that the LORD may bring upon Abraham what He has spoken about him."
11 Gen 21:22 Now it came about at that time that Abimelech and Phicol, the commander of his army, spoke to Abraham, saying, "God is with you in all that you do;
12 Gen 21:32 So they made a covenant at Beersheba; and Abimelech and Phicol, the commander of his army, arose and returned to the land of the Philistines.
16 Gen 32:4 He also commanded them saying, "Thus you shall say to my lord Esau: 'Thus says your servant Jacob, "I have sojourned with Laban, and stayed until now;
17 Gen 32:17 He commanded the one in front, saying, "When my brother Esau meets you and asks you, saying, 'To whom do you belong, and where are you going, and to whom do these animals in front of you belong?'
18 Gen 32:19 Then he commanded also the second and the third, and all those who followed the droves, saying, "After this manner you shall speak to Esau when you find him;