Abel's offering was accepted by God and Cain's wasn't (we don't know why). Cain didn't respond by considering what was wrong with his own actions but by getting angry and eventually killing his brother.
If somebody gets something right that I get wrong, what do I do? Is my first though to look at my own failure or to tear down what the other person has done?
Sin is an opportunity for repentance or more sin. If I lie, do I repent or lash out in anger about getting caught out? Sin breeds exponentially. Repentance breaks it's power