In SPITE of his knowledge of the great suffering he'd have to face when he came to earth....and KNOWING how people would blame him, spit upon him, mock him, curse him, reject him, and finally whip and beat Him beyond recognition before they nailed His hands and feet to a post ... He STILL loved us enough to follow through with his own death, so that we could be saved from being shut off from our Father in heaven, forever. Why forever? Because sin always separates us from God, but thankfully, it doesn't end there. Jesus knew not all would accept him as Savior, but he still wanted all to have the opportunity of salvation through Him, should they decide to do so. This was not the actions of a selfish man.
God had (and has) a plan of escape for man, even though He knew he would get blamed for man's own choice to rebel against him, and that He had done no personal wrong towards man.
Jesus knew mankind could never save himself, as redemption calls for a perfect, sinless sacrifice....so He volunteered to be that sacrifice, being pure and without sin. And no...God NEVER makes mistakes. WE do, but He brings the remedy IN SPITE of our mistakes....which is forgiveness through Jesus, His Son, and our only Mediator between God and man. 1 Timothy 2:5