This is something that I wondered from time to time, too.
Like the question that I posted about Pharaoh...was he actually doing good in the eyes of God? Because God Himself was hardening the heart of Pharaoh so that God's will would eventually be done.
Like with Judas. The Son of Man had to be sacrificed. That was God's will...the cup could not pass from Jesus. God knew what was going to happen before it had happened.
So Judas had no other choice but to betray the Son of Man. It had to take place for all of the other events to fall into line. What would have happened to Jesus that night if Judas had resisted...if he had not betrayed the Son of Man with a kiss?
Jesus knew from the beginning that Judas would betray Him. Would it be sinful for Judas to NOT betray his Master? "It would be better for that man to not have been born at all." So was Judas destined to sin no matter which way he went? Betray the Son of Man and sin. Resist doing what must take place - go against the Will of God - and sin. A no win situation?
As for Cain...didn't he already suffer his punishment? He received a mark on his body and was cast out. Was that his punishment? Was it over then? Had he paid the price then for murdering?
Sorry - I feel like I'm adding more wax to the boiling pot. But these questions come up and itch in places where I can't reach them alone.