Having spiritual souls means that we have free will. We are not bound to do what is good for us by instinct. This also means that we can refuse to do what is good. God did not make us this way as some sort of test, but because he wanted us to be in his own image and likeness. God is Love and love is always free.
You can never force someone to love you. But that doesn't mean he left us to our own devices. Every instinct in our bodies, like everything in Nature, searches for what is healthy, balanced and happy. And God gave us his grace which is like sunshine to our souls so that our hearts would naturally seek him and grow in spiritual depth and maturity. But the first human beings chose to disobey and reject God's invitation.
By doing that they not only lost God's friendship but they wrecked the harmony between their body and soul. The human nature we all inherit from them was damaged and deprived of inner communion with God's grace. This is why we find it hard to be good and why there are so many evils and sufferings in the world. The good news is that God's eternal plan included a way to right these wrongs without destroying human freedom and even to deepen the glory and beauty of love.