 God foreknew these matters. And so he foreknew that man would sin and he foreordained that Christ would come as the sacrificial lamb. What kind of lamb? Without blemish and without spot. Holy and harmless. There's no way that Christ could have sinned.