For God conducts Himself towards us as we are accustomed to conduct ourselves towards Him. We take action first as it pleases us, and after taking action we make inquiries about legality and want our action to be approved by Him. So He punishes us before He asks about legality, just as is stated in Ps. 18:26: “With the crooked Thou dost show Thyself perverse.” But later He allows us to shout and complain about the wrong and injustice which we suffer at the hands of those who afflict us with the just judgment of God. Why are we killed? Why are our goods plundered? I reply that God can do this and invert the regular order because we put action before legality.
Luther’s works, vol. 6: Lectures on Genesis: Chapters 31-37 p 214