God created man: He said to them, ´Avoid all evil´; to each of them he gave precepts about their neighbor
The Bible explains that God created man with dominion and discernment. The man was created with the natural ability to separate good and evil, we all discern and we have to choose in one way or another and that defines us: "Discernment, tongues, and eyes, ears, and a mind for thinking he gave them. With knowledge and understanding he filled them: good and evil he showed them" Ben Sira 17:6-7.
Discernment enables us to understand God's creation, we live in a universe governed by ethical laws, and this implies that there are behaviors ordered to rewards and behaviors ordered to punishments (Psalm 1:1-6), and this is what we have to take into account when we choose our path, we lead a life of righteousness ("Do unto others as you would have them do unto you", Matthew 7:12) or a life full of sins, our neighbor, matters or not. The path of sin is a selfish and intrinsically painful path, while the path of righteousness is a path of happiness and inner light.
That is why God taught us his eternal and perfect law, so that we become aware. God is perfect and does not live with imperfections, like falsehood or lies, that is why the psalmist tells us that God asks us to stay away from evil: "He said to them, ´Avoid all evil´; to each of them he gave precepts about their neighbor" Ben Sira 17:14.
But this request that the Lord makes of us is not so simple, no one is born knowing everything, and we are also subject to error due to the difficulties of the world (oppression), so if we are on the wrong path, the Lord calls us to repent, so that we can live as brothers: "But to the penitent he provides a way back and encourages those who are losing hope! Turn back to the Lord and give up your sins, pray before him and make your offenses few" Ben Sira 17:24-25.
God wants the best for us ("Be holy, because I am holy" 1 Peter 1:16), but man has the freedom to choose.