The answer
God can solve all our problems, and change whatever is darkness into light. God gives us the free will to decide which path to follow. So, instead of wondering why God creates us when we sin, try repenting, in order to enjoy the Kingdom of Heaven. Also, in the Bible, it is written that the declared things are ours, and the secret things are the Lord’s. Once a man asked the Lord this same question, in contemplation, and the Lord answered him saying “My dear son, obey what is written in the Bible and do not be concerned about My justice and My love. When you come here you will see that My justice is infinite and My love is infinite, so do not worry and do not ask Me now; you will know when you come here”.
H.G. Bishop Moussa