Why did God do this? Because he knew that each human being was imperfect – God created each of us, and he created us in his image (which means that we have some special qualities as human beings that reflect who God is) to be his representatives on earth under his Kingship.
And yet each human being has responded not by living under God’s Kingship, but by trying to take over from God – trying to replace him with ourselves, and our kind (human beings in general). This rejection of God’s Kingship is what causes us to do terrible things towards God, each other, and the whole earth – we call this ‘sin’. None of us has lived as God intended for us to live, and so we have this sense that something is wrong – that things are not as they are meant to be either inside us or in the world.
God saw this, and so sent Jesus (who we call the Son of God) to live the life we could not live – a life of perfect obedience to God as Father and King – and to make a way for us to experience life and life to the full: life as God always intended it.
How? By dying on the cross in our place, as our substitute. Jesus lived the life we could not live and died the death we all deserve. You see, God is infinitely holy and absolutely righteous, and so in order to make a way for us to approach such a Holy God, a sacrifice was needed – God himself in the person of Jesus became that sacrifice.