That is indeed a complicated topic. God creates us humans as intelligent beings and gave us the ability to correct ourselves, i.e., to invert our inborn egoistic nature to altruism. If we refuse to do so and remain foolish, then…
There is a parable about a strong wind blowing at a tree, bending and almost breaking it. The tree told the wind: “You’re going to break me.” The wind answered: “No, I will make you stronger, your roots will grow…