Now Abel kept flocks, and Cain worked the soil. 3 In the course of time Cain brought some of the fruits of the soil as an offering to the Lord. 4 And Abel also brought an offering—fat portions from some of the firstborn of his flock. The Lord looked with favor on Abel and his offering, 5 but on Cain and his offering he did not look with favor. So Cain was very angry, and his face was downcast. Genesis 4:3-7
Both Cain and Abel had jobs to do. One tended animals and the other gardened. Both sacrificed but only Cain’s offering was rejected. Of course we don’t know for sure but it’s probably because Cain didn’t sacrifice from the firstfruits of his crops. Cain became angry because he was rejected by the Lord.
Both kids knew the rules regarding sacrifice, but Cain “fudged” a bit. Yes, he did sacrifice but it wasn’t from the firstfruits of his labor. It didn’t cost him anything. Recall 2 Samuel 24:24 when Arunah offered to let David have the threshing floor for free
“But the king replied to Araunah, ‘No, I insist on paying you for it. I will not sacrifice to the Lord my God burnt offerings that cost me nothing.’ So David bought the threshing floor and the oxen and paid fifty shekels of silver for them.”
Cain knew that his offering was less than the best. He had to know.
Fortunately, God’s sacrifice for us was the best possible sacrifice. It wasn’t half-hearted or mediocre or tepid.