So it came about in the course of time that Cain brought an offering to the LORD of the fruit of the ground. Abel, on his part also brought of the firstlings of his flock and of their fat portions. And the LORD had regard for Abel and for his offering; but for Cain and for his offering He had no regard. So Cain became very angry and his countenance fell. Then the LORD said to Cain, “Why are you angry? And why has your countenance fallen? If you do well, will not your countenance be lifted up? And if you do not do well, sin is crouching at the door; and its desire is for you, but you must master it” (Genesis 4:3-7).
It is interesting that the Genesis account offers no hint that Cain knew beforehand, or had any reason to suspect, that his offering would not be accepted by God. There is also no hint that the offering was rejected because of any moral failing on Cain’s part. (God warns Cain against sinning in response to his sacrifice’s rejection, but does not suggest that the rejection was itself a response to sin on Cain’s part.)
Reading the story, one pictures Cain and Abel both approaching God, both offering sacrifices, and both watching as Cain’s careful-prepared offering is rejected, in what must have appeared to Cain to be a purely arbitrary divine preference. It certainly could not have appeared “fair.”
And yet, God is God. One is reminded of Paul’s inquiry in Romans 9, “Who are you, O man, who answers back to God? The thing molded will not say to the molder, ‘Why did you make me like this,’ will it?” God said to Cain, “Thus shall it be,” and all that was left to Cain was how to respond. However, note God’s promise: “If you do well, will not your countenance be lifted up?” God was testing Cain, offering him the chance to acquiesce to the divine command and grow nearer God by his acquiescence.
Of course, we know that Cain did not “do well,” and rather than master sin, it mastered him as he murdered his own brother in his anger. But it was Cain’s reaction that turned God’s test into the impetus for sin rather than an opportunity for spiritual growth.