Which he knew was about to happen and didn't stop.
Here's what I don't get, among many, many other parts of the bible. If he's omnipotent and omniscient, and we're all sinners, why not just forgive us? Why allow -- no, require -- your son to be tortured and killed first? I want someone to explain it to me like I'm in Sunday school in a way that makes more sense than "because the bible is a work of fiction written by superstitious men who were obsessed with blood sacrifice".